]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf893f8b87aa49a519b4d6dbd91616790f55a9023
tree0c570945a279c689e443ba2333850f6782567438
parenta8c80d013a25bf1cca59d2a2512c3a4d03f5cf6c
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: cee96d6ee06a ("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