Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
[platform/kernel/linux-starfive.git] / drivers / pwm / pwm-puv3.c
index b882f60..db964e6 100644 (file)
@@ -123,9 +123,9 @@ static int pwm_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       puv3->base = devm_request_and_ioremap(&pdev->dev, r);
-       if (puv3->base == NULL)
-               return -EADDRNOTAVAIL;
+       puv3->base = devm_ioremap_resource(&pdev->dev, r);
+       if (IS_ERR(puv3->base))
+               return PTR_ERR(puv3->base);
 
        puv3->chip.dev = &pdev->dev;
        puv3->chip.ops = &puv3_pwm_ops;