aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorUwe Kleine-König <uwe@kleine-koenig.org>2020-11-06 18:15:47 +0100
committerThierry Reding <thierry.reding@gmail.com>2020-12-17 14:18:48 +0100
commit5e5da1e9fbeecdf9d7a7495d7ae2a37453e38499 (patch)
tree43e744122c3575fcfa91a2ce4ff95727bd46b800 /drivers/pwm
parentpwm: zx: Add missing cleanup in error path (diff)
downloadlinux-dev-5e5da1e9fbeecdf9d7a7495d7ae2a37453e38499.tar.xz
linux-dev-5e5da1e9fbeecdf9d7a7495d7ae2a37453e38499.zip
pwm: ab8500: Explicitly allocate pwm chip base dynamically
The ab8500 driver is the last one which doesn't (explicitly) use dynamic allocation of the pwm id. Looking through the kernel sources I didn't find a place that relies on this id. And with the device probed from device tree pdev->id is -1 anyhow; making this explicit looks beneficial, too. Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-ab8500.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c
index 4b6f9e24e11d..58c6c0f5b0ec 100644
--- a/drivers/pwm/pwm-ab8500.c
+++ b/drivers/pwm/pwm-ab8500.c
@@ -101,7 +101,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
ab8500->chip.dev = &pdev->dev;
ab8500->chip.ops = &ab8500_pwm_ops;
- ab8500->chip.base = pdev->id;
+ ab8500->chip.base = -1;
ab8500->chip.npwm = 1;
err = pwmchip_add(&ab8500->chip);