]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - drivers/mmc/host/dw_mmc-pltfm.c
mmc: Convert to devm_ioremap_resource()
[mirror_ubuntu-focal-kernel.git] / drivers / mmc / host / dw_mmc-pltfm.c
index 5e1fb1d2c422447b62c5c264f1a7be014a5c2f87..41c27b74b003e5c742cdfcc3d57ba2a002836791 100644 (file)
@@ -10,6 +10,7 @@
  * (at your option) any later version.
  */
 
+#include <linux/err.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/io.h>
@@ -46,9 +47,9 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
        host->dev = &pdev->dev;
        host->irq_flags = 0;
        host->pdata = pdev->dev.platform_data;
-       host->regs = devm_request_and_ioremap(&pdev->dev, regs);
-       if (!host->regs)
-               return -ENOMEM;
+       host->regs = devm_ioremap_resource(&pdev->dev, regs);
+       if (IS_ERR(host->regs))
+               return PTR_ERR(host->regs);
 
        if (drv_data && drv_data->init) {
                ret = drv_data->init(host);