ar71xx: ag71xx: fix mii_bus_dev sanity check
authorGabor Juhos <juhosg@openwrt.org>
Sat, 22 Dec 2012 12:12:41 +0000 (12:12 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 22 Dec 2012 12:12:41 +0000 (12:12 +0000)
The mii_bus device is not required if phy_mask is zero.
The driver will use a fixed connection if it is not
specified.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 34849

target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c

index 1564504486d083c9462959470d2553533b29e794..6dadf94a40259666516fe8c743cee15d9f045085 100644 (file)
@@ -1071,7 +1071,7 @@ static int __devinit ag71xx_probe(struct platform_device *pdev)
                goto err_out;
        }
 
-       if (pdata->mii_bus_dev == NULL) {
+       if (pdata->mii_bus_dev == NULL && pdata->phy_mask) {
                dev_err(&pdev->dev, "no MII bus device specified\n");
                err = -EINVAL;
                goto err_out;