diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-06-05 13:24:10 +0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-06-27 19:24:03 +0400 |
commit | bcc8766696fe2023b498a4a5c19cf8d2193aa62e (patch) | |
tree | 3969b5ee349f2a2f2889c5a4d4ecad32cddd242d /drivers/mmc/host/dw_mmc-pltfm.c | |
parent | fdfa20c1631210d0ca218689204682ea80e170e3 (diff) | |
download | linux-bcc8766696fe2023b498a4a5c19cf8d2193aa62e.tar.xz |
mmc: dw_mmc-pltfm: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource.
No need to duplicate this in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc-pltfm.c')
-rw-r--r-- | drivers/mmc/host/dw_mmc-pltfm.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c index 37873f101cdb..526abae74c74 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.c +++ b/drivers/mmc/host/dw_mmc-pltfm.c @@ -25,7 +25,7 @@ #include "dw_mmc.h" int dw_mci_pltfm_register(struct platform_device *pdev, - const struct dw_mci_drv_data *drv_data) + const struct dw_mci_drv_data *drv_data) { struct dw_mci *host; struct resource *regs; @@ -35,10 +35,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev, if (!host) return -ENOMEM; - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!regs) - return -ENXIO; - host->irq = platform_get_irq(pdev, 0); if (host->irq < 0) return host->irq; @@ -47,6 +43,8 @@ int dw_mci_pltfm_register(struct platform_device *pdev, host->dev = &pdev->dev; host->irq_flags = 0; host->pdata = pdev->dev.platform_data; + + regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); host->regs = devm_ioremap_resource(&pdev->dev, regs); if (IS_ERR(host->regs)) return PTR_ERR(host->regs); |