diff options
author | Florian Fainelli <florian@openwrt.org> | 2009-06-04 10:04:53 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2009-06-04 10:04:53 +0000 |
commit | da93c74c84bde7e9c5755de635c5b68b1d546202 (patch) | |
tree | 696d47e5a504c5bab03d0c0fe2620f4078aceab0 /target | |
parent | dbbeab5dbd4f4ef0a1dae5021ae96816c398da4c (diff) | |
download | master-187ad058-da93c74c84bde7e9c5755de635c5b68b1d546202.tar.gz master-187ad058-da93c74c84bde7e9c5755de635c5b68b1d546202.tar.bz2 master-187ad058-da93c74c84bde7e9c5755de635c5b68b1d546202.zip |
[brcm63xx] fix ethernet driver removal
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16335 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.c b/target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.c index a72149250a..7dad43db99 100644 --- a/target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.c +++ b/target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.c @@ -1778,6 +1778,7 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev) dev->change_mtu = bcm_enet_change_mtu; SET_ETHTOOL_OPS(dev, &bcm_enet_ethtool_ops); + SET_NETDEV_DEV(dev, &pdev->dev); ret = register_netdev(dev); if (ret) @@ -1786,7 +1787,6 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev) platform_set_drvdata(pdev, dev); priv->pdev = pdev; priv->net_dev = dev; - SET_NETDEV_DEV(dev, &pdev->dev); return 0; @@ -1857,6 +1857,7 @@ static int __devexit bcm_enet_remove(struct platform_device *pdev) clk_disable(priv->mac_clk); clk_put(priv->mac_clk); + platform_set_drvdata(pdev, NULL); free_netdev(dev); return 0; } |