ath79: ag71xx-mdio: get reset control using devm api
authorChuanhong Guo <gch981213@gmail.com>
Sat, 15 Dec 2018 07:35:37 +0000 (15:35 +0800)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 5 Mar 2019 02:02:34 +0000 (03:02 +0100)
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c

index 58aef748724ae85e4d3b91e291b32869becd35fa..a58ee3346bb602401a706be8b370446d5b090b83 100644 (file)
@@ -190,7 +190,7 @@ static int ag71xx_mdio_probe(struct platform_device *pdev)
        if (!mii_bus)
                return -ENOMEM;
 
-       am->mdio_reset = of_reset_control_get_exclusive(np, "mdio");
+       am->mdio_reset = devm_reset_control_get_exclusive(amdev, "mdio");
        builtin_switch = of_property_read_bool(np, "builtin-switch");
 
        mii_bus->name = "ag71xx_mdio";