Merge tag 'rpmsg-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc...
[linux-2.6-block.git] / drivers / nvmem / lpc18xx_otp.c
index 16c92ea85d499235f2e3c79a7a334205a8366715..adc9948e7b2ec9ca62e0dfa829c3e3c69b0c73d3 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/module.h>
 #include <linux/nvmem-provider.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
@@ -68,14 +67,12 @@ static int lpc18xx_otp_probe(struct platform_device *pdev)
 {
        struct nvmem_device *nvmem;
        struct lpc18xx_otp *otp;
-       struct resource *res;
 
        otp = devm_kzalloc(&pdev->dev, sizeof(*otp), GFP_KERNEL);
        if (!otp)
                return -ENOMEM;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       otp->base = devm_ioremap_resource(&pdev->dev, res);
+       otp->base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(otp->base))
                return PTR_ERR(otp->base);