* [PATCH] pwm: ab8500: Explicitly allocate pwm chip base dynamically
@ 2020-11-06 17:15 Uwe Kleine-König
2020-11-11 19:55 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2020-11-06 17:15 UTC (permalink / raw)
To: Thierry Reding, Lee Jones; +Cc: linux-pwm, Linus Walleij
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(-)
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);
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pwm: ab8500: Explicitly allocate pwm chip base dynamically
2020-11-06 17:15 [PATCH] pwm: ab8500: Explicitly allocate pwm chip base dynamically Uwe Kleine-König
@ 2020-11-11 19:55 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2020-11-11 19:55 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: Lee Jones, linux-pwm, Linus Walleij
[-- Attachment #1: Type: text/plain, Size: 562 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-11 19:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 17:15 [PATCH] pwm: ab8500: Explicitly allocate pwm chip base dynamically Uwe Kleine-König
2020-11-11 19:55 ` Thierry Reding
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.