Message ID | 20201106171547.50669-1-uwe@kleine-koenig.org |
---|---|
State | Accepted |
Headers | show |
Series | pwm: ab8500: Explicitly allocate pwm chip base dynamically | expand |
On Fri, Nov 06, 2020 at 06:15:47PM +0100, Uwe Kleine-König wrote: > 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> > --- > drivers/pwm/pwm-ab8500.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. Thierry
diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c index b1e1d747cbaa..e6eda26b3418 100644 --- a/drivers/pwm/pwm-ab8500.c +++ b/drivers/pwm/pwm-ab8500.c @@ -104,7 +104,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);
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> --- drivers/pwm/pwm-ab8500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)