diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-06-27 03:45:22 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-27 21:22:06 -0700 |
commit | 119fc007766fc6ec6cff0f696d73cebb6f2cbe58 (patch) | |
tree | 9d4352c5176fc654b9dbd98e745d7daeb3bc6a35 | |
parent | 5fa9c0fe3ec0a008352d4a4fb8d972a437183404 (diff) | |
download | linux-3.10-119fc007766fc6ec6cff0f696d73cebb6f2cbe58.tar.gz linux-3.10-119fc007766fc6ec6cff0f696d73cebb6f2cbe58.tar.bz2 linux-3.10-119fc007766fc6ec6cff0f696d73cebb6f2cbe58.zip |
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>
-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 4dce9e3ac83..f174070646f 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) return; phy_reset = of_get_named_gpio(np, "phy-reset-gpios", 0); - err = gpio_request_one(phy_reset, GPIOF_OUT_INIT_LOW, "phy-reset"); + err = devm_gpio_request_one(&pdev->dev, phy_reset, + GPIOF_OUT_INIT_LOW, "phy-reset"); if (err) { pr_debug("FEC: failed to get gpio phy-reset: %d\n", err); return; |