diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-06-26 23:45:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-28 00:22:06 -0400 |
commit | 119fc007766fc6ec6cff0f696d73cebb6f2cbe58 (patch) | |
tree | 9d4352c5176fc654b9dbd98e745d7daeb3bc6a35 /drivers/net/ethernet/freescale | |
parent | 5fa9c0fe3ec0a008352d4a4fb8d972a437183404 (diff) |
net: fec: use managed function devm_gpio_request_one
Using gpio_request_one will require the probe fail-out call gpio_free,
which is missing currently. Change to use devm_gpio_request_one to
fix the problem.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/fec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c index 4dce9e3ac83a..f174070646f5 100644 --- a/drivers/net/ethernet/freescale/fec.c +++ b/drivers/net/ethernet/freescale/fec.c | |||
@@ -1513,7 +1513,8 @@ static void __devinit fec_reset_phy(struct platform_device *pdev) | |||
1513 | return; | 1513 | return; |
1514 | 1514 | ||
1515 | phy_reset = of_get_named_gpio(np, "phy-reset-gpios", 0); | 1515 | phy_reset = of_get_named_gpio(np, "phy-reset-gpios", 0); |
1516 | err = gpio_request_one(phy_reset, GPIOF_OUT_INIT_LOW, "phy-reset"); | 1516 | err = devm_gpio_request_one(&pdev->dev, phy_reset, |
1517 | GPIOF_OUT_INIT_LOW, "phy-reset"); | ||
1517 | if (err) { | 1518 | if (err) { |
1518 | pr_debug("FEC: failed to get gpio phy-reset: %d\n", err); | 1519 | pr_debug("FEC: failed to get gpio phy-reset: %d\n", err); |
1519 | return; | 1520 | return; |