mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
net: stmmac: fix reset gpio free missing
[ Upstream commit49ce881c0d] Commit984203ceff("net: stmmac: mdio: remove reset gpio free") removed the reset gpio free, when the driver is unbinded or rmmod, we miss the gpio free. This patch uses managed API to request the reset gpio, so that the gpio could be freed properly. Fixes:984203ceff("net: stmmac: mdio: remove reset gpio free") Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
385ee66eaf
commit
03069e85ac
@@ -157,7 +157,8 @@ int stmmac_mdio_reset(struct mii_bus *bus)
|
||||
of_property_read_u32_array(np,
|
||||
"snps,reset-delays-us", data->delays, 3);
|
||||
|
||||
if (gpio_request(data->reset_gpio, "mdio-reset"))
|
||||
if (devm_gpio_request(priv->device, data->reset_gpio,
|
||||
"mdio-reset"))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user