aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-lpss-pci.c
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2022-09-27 16:24:17 +0000
committerThierry Reding <[email protected]>2022-09-28 14:10:35 +0000
commit68af6fb00f2f1e72521169d5a4283faa8533694d (patch)
tree599631015b94849bcb0304e58fb3b8d2c6edaebe /drivers/pwm/pwm-lpss-pci.c
parentpwm: lpss: Move exported symbols to PWM_LPSS namespace (diff)
downloadkernel-68af6fb00f2f1e72521169d5a4283faa8533694d.tar.gz
kernel-68af6fb00f2f1e72521169d5a4283faa8533694d.zip
pwm: lpss: Move resource mapping to the glue drivers
Move resource mapping to the glue drivers which helps to transform pwm_lpss_probe() to pure library function that may be used by others without need of specific resource management. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-lpss-pci.c')
-rw-r--r--drivers/pwm/pwm-lpss-pci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-lpss-pci.c b/drivers/pwm/pwm-lpss-pci.c
index 9f2c666b95ec..f3367e844e61 100644
--- a/drivers/pwm/pwm-lpss-pci.c
+++ b/drivers/pwm/pwm-lpss-pci.c
@@ -25,8 +25,12 @@ static int pwm_lpss_probe_pci(struct pci_dev *pdev,
if (err < 0)
return err;
+ err = pcim_iomap_regions(pdev, BIT(0), pci_name(pdev));
+ if (err)
+ return err;
+
info = (struct pwm_lpss_boardinfo *)id->driver_data;
- lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
+ lpwm = pwm_lpss_probe(&pdev->dev, pcim_iomap_table(pdev)[0], info);
if (IS_ERR(lpwm))
return PTR_ERR(lpwm);