diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-02-10 13:05:12 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-02-10 13:05:12 +0000 |
commit | 8fed7b76c73b7593009fdc9cf57cb0c0d4df53a2 (patch) | |
tree | 1a351a74e10fa78ef90a31d1737b62d81f2ff3c3 /target/linux/generic/files/drivers/net | |
parent | e2c3500afa6c99e362509775d8a17fea0b8b0008 (diff) |
generic: ar8216: skip probe on unused PHY addresses
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35536 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 4547f7c3b..45b2bd7a6 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -1962,6 +1962,10 @@ ar8216_probe(struct phy_device *pdev) struct ar8216_priv *priv; int ret; + /* skip PHYs at unused adresses */ + if (pdev->addr != 0 && pdev->addr != 4) + return -ENODEV; + priv = kzalloc(sizeof(struct ar8216_priv), GFP_KERNEL); if (priv == NULL) return -ENOMEM; |