summaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorFlorian Fainelli <florian.fainelli@broadcom.com>2023-11-13 17:46:32 +0100
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-11-21 11:09:32 +0100
commit4e7a8dbd2bc0aec4605a5069df7a779bd9e64db1 (patch)
tree6cf1eed941f86c10dbb75dcefbbf8ebb83f80aaa /drivers/pwm
parentLinux 6.7-rc1 (diff)
downloadlinux-4e7a8dbd2bc0aec4605a5069df7a779bd9e64db1.tar.xz
linux-4e7a8dbd2bc0aec4605a5069df7a779bd9e64db1.zip
pwm: bcm2835: Fix NPD in suspend/resume
When 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume") was sent out on October 11th,, there was still a call to platform_set_drvdata() which would ensure that the driver private data structure could be used in bcm2835_pwm_{suspend,resume}. A cleanup now merged as commit commit 2ce7b7f6704c ("pwm: bcm2835: Simplify using devm functions") removed that call which would now cause a NPD in bcm2835_pwm_{suspend,resume} as a consequence. Fixes: 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume") Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/linux-pwm/20231113164632.2439400-1-florian.fainelli@broadcom.com Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-bcm2835.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index 9777babd5b95..ab30667f4f95 100644
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -155,6 +155,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
pc->chip.ops = &bcm2835_pwm_ops;
pc->chip.npwm = 2;
+ platform_set_drvdata(pdev, pc);
+
ret = devm_pwmchip_add(&pdev->dev, &pc->chip);
if (ret < 0)
return dev_err_probe(&pdev->dev, ret,