Skip to content

Commit

Permalink
pwm: ab8500: Explicitly allocate pwm chip base dynamically
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ukleinek authored and thierryreding committed Dec 17, 2020
1 parent 269effd commit 5e5da1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pwm/pwm-ab8500.c
Expand Up @@ -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);
Expand Down

0 comments on commit 5e5da1e

Please sign in to comment.