aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-08-01 22:33:49 +0200
committerJo-Philipp Wich <jo@mein.io>2018-08-01 22:34:22 +0200
commitb9bd3285c7c6fbc60374b05ac2da9be41ce75651 (patch)
tree489d849df1cc4b00481289787e931cda75f15a33 /target/linux
parent33dbe2c55da1480559092185c4ef071995d9bc90 (diff)
downloadupstream-b9bd3285c7c6fbc60374b05ac2da9be41ce75651.tar.gz
upstream-b9bd3285c7c6fbc60374b05ac2da9be41ce75651.tar.bz2
upstream-b9bd3285c7c6fbc60374b05ac2da9be41ce75651.zip
Revert "ar71xx: ag71xx: Prevent kernel oops for board def"
This reverts commit 7a3e133751870a3431e2430386a77a002eb24117. This change reportedly breaks connectivity on some ar71xx devices, so revert it for now. Ref: https://github.com/openwrt/openwrt/pull/1217#issuecomment-409708087 Reported-by: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c16
1 files changed, 1 insertions, 15 deletions
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: