From: Uwe Kleine-König Date: Fri, 6 Nov 2020 17:15:47 +0000 (+0100) Subject: pwm: ab8500: Explicitly allocate pwm chip base dynamically X-Git-Tag: v5.11-rc1~60^2~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e5da1e9fbee;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c index 4b6f9e24e11d4..58c6c0f5b0ec6 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);