X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Ffiles%2Fdrivers%2Fnet%2Fethernet%2Fatheros%2Fag71xx%2Fag71xx_phy.c;fp=target%2Flinux%2Far71xx%2Ffiles%2Fdrivers%2Fnet%2Fethernet%2Fatheros%2Fag71xx%2Fag71xx_phy.c;h=12fa2e301bf5c24e85fcc025cc5d10b9983b0eba;hb=b9bd3285c7c6fbc60374b05ac2da9be41ce75651;hp=daa373be693291ca5302470cfde4129a59d9e72f;hpb=33dbe2c55da1480559092185c4ef071995d9bc90;p=openwrt%2Fstaging%2Fwigyori.git diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c index daa373be69..12fa2e301b 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c @@ -76,24 +76,10 @@ void ag71xx_phy_stop(struct ag71xx *ag) static int ag71xx_phy_connect_fixed(struct ag71xx *ag) { - struct platform_device *pdev = ag->pdev; - struct device *dev = NULL; + struct device *dev = &ag->pdev->dev; struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag); int ret = 0; - if (!pdev) - return -ENODEV; - - dev = &pdev->dev; - - if (!dev) - return -ENODEV; - - if (!ag->phy_dev) { - pr_err("Missing PHY for %s", dev_name(dev)); - return -ENODEV; - } - /* use fixed settings */ switch (pdata->speed) { case SPEED_10: