aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:11 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 15:21:47 -0500
commita3e2cd7f24ba7521169943ace3d14b567487ea29 (patch)
tree4aa79ec01e6a281a846d651ee25c0b94d28b36fc /drivers/mmc/host
parent6c2db1c682a9668b854f9f4025650f7145bd090f (diff)
mmc: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Cc: Chris Ball <cjb@laptop.org> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/dw_mmc-pltfm.c7
-rw-r--r--drivers/mmc/host/mxs-mmc.c6
-rw-r--r--drivers/mmc/host/sdhci-s3c.c7
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 5e1fb1d2c422..41c27b74b003 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -10,6 +10,7 @@
10 * (at your option) any later version. 10 * (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/err.h>
13#include <linux/interrupt.h> 14#include <linux/interrupt.h>
14#include <linux/module.h> 15#include <linux/module.h>
15#include <linux/io.h> 16#include <linux/io.h>
@@ -46,9 +47,9 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
46 host->dev = &pdev->dev; 47 host->dev = &pdev->dev;
47 host->irq_flags = 0; 48 host->irq_flags = 0;
48 host->pdata = pdev->dev.platform_data; 49 host->pdata = pdev->dev.platform_data;
49 host->regs = devm_request_and_ioremap(&pdev->dev, regs); 50 host->regs = devm_ioremap_resource(&pdev->dev, regs);
50 if (!host->regs) 51 if (IS_ERR(host->regs))
51 return -ENOMEM; 52 return PTR_ERR(host->regs);
52 53
53 if (drv_data && drv_data->init) { 54 if (drv_data && drv_data->init) {
54 ret = drv_data->init(host); 55 ret = drv_data->init(host);
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 206fe499ded5..5b665551a6f3 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -614,9 +614,9 @@ static int mxs_mmc_probe(struct platform_device *pdev)
614 host = mmc_priv(mmc); 614 host = mmc_priv(mmc);
615 ssp = &host->ssp; 615 ssp = &host->ssp;
616 ssp->dev = &pdev->dev; 616 ssp->dev = &pdev->dev;
617 ssp->base = devm_request_and_ioremap(&pdev->dev, iores); 617 ssp->base = devm_ioremap_resource(&pdev->dev, iores);
618 if (!ssp->base) { 618 if (IS_ERR(ssp->base)) {
619 ret = -EADDRNOTAVAIL; 619 ret = PTR_ERR(ssp->base);
620 goto out_mmc_free; 620 goto out_mmc_free;
621 } 621 }
622 622
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 82a8de148a8f..a0c621421ee8 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -651,10 +651,9 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
651#endif 651#endif
652 652
653 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 653 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
654 host->ioaddr = devm_request_and_ioremap(&pdev->dev, res); 654 host->ioaddr = devm_ioremap_resource(&pdev->dev, res);
655 if (!host->ioaddr) { 655 if (IS_ERR(host->ioaddr)) {
656 dev_err(dev, "failed to map registers\n"); 656 ret = PTR_ERR(host->ioaddr);
657 ret = -ENXIO;
658 goto err_req_regs; 657 goto err_req_regs;
659 } 658 }
660 659