diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2013-06-10 17:05:05 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-12 02:22:35 -0700 |
commit | 941e173a538c58f7f60e3f70ab0e35d51563405b (patch) | |
tree | 57805faa9c788cbc7c70f76d5109ef0c0f221c76 /drivers/net/ethernet/freescale/fec_main.c | |
parent | afd6eae13cc4229e25d59334cdc46d042b24a4a5 (diff) | |
download | lwn-941e173a538c58f7f60e3f70ab0e35d51563405b.tar.gz lwn-941e173a538c58f7f60e3f70ab0e35d51563405b.zip |
net: fec: Convert to use devm_ioremap_resource
Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: netdev@vger.kernel.org
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec_main.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index fa4a68fc01cb..c540055e4f4f 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1876,17 +1876,17 @@ fec_probe(struct platform_device *pdev) (pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT)) fep->pause_flag |= FEC_PAUSE_FLAG_AUTONEG; - fep->hwp = devm_request_and_ioremap(&pdev->dev, r); + fep->hwp = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(fep->hwp)) { + ret = PTR_ERR(fep->hwp); + goto failed_ioremap; + } + fep->pdev = pdev; fep->dev_id = dev_id++; fep->bufdesc_ex = 0; - if (!fep->hwp) { - ret = -ENOMEM; - goto failed_ioremap; - } - platform_set_drvdata(pdev, ndev); ret = of_get_phy_mode(pdev->dev.of_node); |