diff options
| author | Andy Shevchenko <[email protected]> | 2022-09-27 16:24:17 +0000 |
|---|---|---|
| committer | Thierry Reding <[email protected]> | 2022-09-28 14:10:35 +0000 |
| commit | 68af6fb00f2f1e72521169d5a4283faa8533694d (patch) | |
| tree | 599631015b94849bcb0304e58fb3b8d2c6edaebe /drivers/pwm/pwm-lpss.c | |
| parent | pwm: lpss: Move exported symbols to PWM_LPSS namespace (diff) | |
| download | kernel-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.c')
| -rw-r--r-- | drivers/pwm/pwm-lpss.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c index 74a296cb1af0..a20915459809 100644 --- a/drivers/pwm/pwm-lpss.c +++ b/drivers/pwm/pwm-lpss.c @@ -243,7 +243,7 @@ static const struct pwm_ops pwm_lpss_ops = { .owner = THIS_MODULE, }; -struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r, +struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, void __iomem *base, const struct pwm_lpss_boardinfo *info) { struct pwm_lpss_chip *lpwm; @@ -258,10 +258,7 @@ struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r, if (!lpwm) return ERR_PTR(-ENOMEM); - lpwm->regs = devm_ioremap_resource(dev, r); - if (IS_ERR(lpwm->regs)) - return ERR_CAST(lpwm->regs); - + lpwm->regs = base; lpwm->info = info; c = lpwm->info->clk_rate; |
