OSDN Git Service

net: mdio: mscc-miim: Fix the mdio controller
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Tue, 28 Sep 2021 07:17:20 +0000 (09:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Sep 2021 12:28:46 +0000 (13:28 +0100)
commitc6995117b60ef3f7afca8fb41f906e9f459d869a
tree0c570945a279c689e443ba2333850f6782567438
parentf4bd73b5a950866f6c6fc98a7b684d307c5d586a
net: mdio: mscc-miim: Fix the mdio controller

According to the documentation the second resource is optional. But the
blamed commit ignores that and if the resource is not there it just
fails.

This patch reverts that to still allow the second resource to be
optional because other SoC have the some MDIO controller and doesn't
need to second resource.

Fixes: 672a1c394950 ("net: mdio: mscc-miim: Make use of the helper function devm_platform_ioremap_resource()")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mdio/mdio-mscc-miim.c