diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-09-27 19:24:17 +0300 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2022-09-28 16:10:35 +0200 |
commit | 68af6fb00f2f1e72521169d5a4283faa8533694d (patch) | |
tree | 599631015b94849bcb0304e58fb3b8d2c6edaebe /drivers/pwm/pwm-lpss.c | |
parent | a3682d2fe3c36c68899bf1b956ed68d36d005868 (diff) | |
download | linux-68af6fb00f2f1e72521169d5a4283faa8533694d.tar.gz |
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 <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
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; |