diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-12-08 10:29:27 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-12-08 10:29:27 +0000 |
commit | 18867965f79a4dc13db50cdc529c102373da64a8 (patch) | |
tree | 1d3d6f37ea72c8c2eac475a7536614f4f5cfba10 /target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c | |
parent | 0e79007faf77c93d1ac7c3eba19c09df025e9528 (diff) | |
download | upstream-18867965f79a4dc13db50cdc529c102373da64a8.tar.gz upstream-18867965f79a4dc13db50cdc529c102373da64a8.tar.bz2 upstream-18867965f79a4dc13db50cdc529c102373da64a8.zip |
ar71xx: add support for external mii_bus
SVN-Revision: 18692
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c')
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c index 28708f4216..88edb2fd4c 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c @@ -824,6 +824,12 @@ static int __init ag71xx_probe(struct platform_device *pdev) goto err_out; } + if (pdata->mii_bus_dev == NULL) { + dev_err(&pdev->dev, "no MII bus device specified\n"); + err = -EINVAL; + goto err_out; + } + dev = alloc_etherdev(sizeof(*ag)); if (!dev) { dev_err(&pdev->dev, "alloc_etherdev failed\n"); @@ -836,7 +842,6 @@ static int __init ag71xx_probe(struct platform_device *pdev) ag = netdev_priv(dev); ag->pdev = pdev; ag->dev = dev; - ag->mii_bus = ag71xx_mdio_bus->mii_bus; ag->msg_enable = netif_msg_init(ag71xx_msg_level, AG71XX_DEFAULT_MSG_ENABLE); spin_lock_init(&ag->lock); |