mtd: devices: elm: remove unnecessary platform_set_drvdata()
[deliverable/linux.git] / drivers / mtd / devices / elm.c
index dccef9fdc1f276269566bcc4ba03ae6e7a87111d..4fab47a4a139bc3d86a085af0b37498ce85e0e77 100644 (file)
@@ -351,9 +351,9 @@ static int elm_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       info->elm_base = devm_request_and_ioremap(&pdev->dev, res);
-       if (!info->elm_base)
-               return -EADDRNOTAVAIL;
+       info->elm_base = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(info->elm_base))
+               return PTR_ERR(info->elm_base);
 
        ret = devm_request_irq(&pdev->dev, irq->start, elm_isr, 0,
                        pdev->name, info);
@@ -381,7 +381,6 @@ static int elm_remove(struct platform_device *pdev)
 {
        pm_runtime_put_sync(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
-       platform_set_drvdata(pdev, NULL);
        return 0;
 }
 
This page took 0.028566 seconds and 5 git commands to generate.