diff options
Diffstat (limited to 'drivers/pwm/pwm-lpss-platform.c')
-rw-r--r-- | drivers/pwm/pwm-lpss-platform.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-lpss-platform.c b/drivers/pwm/pwm-lpss-platform.c index 65154c0abab1..7bbbb7a9b578 100644 --- a/drivers/pwm/pwm-lpss-platform.c +++ b/drivers/pwm/pwm-lpss-platform.c @@ -21,16 +21,19 @@ static int pwm_lpss_probe_platform(struct platform_device *pdev) const struct pwm_lpss_boardinfo *info; const struct acpi_device_id *id; struct pwm_lpss_chip *lpwm; - struct resource *r; + void __iomem *base; id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev); if (!id) return -ENODEV; info = (const struct pwm_lpss_boardinfo *)id->driver_data; - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - lpwm = pwm_lpss_probe(&pdev->dev, r, info); + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); + + lpwm = pwm_lpss_probe(&pdev->dev, base, info); if (IS_ERR(lpwm)) return PTR_ERR(lpwm); |