Commit 4e7a8dbd authored by Florian Fainelli's avatar Florian Fainelli Committed by Uwe Kleine-König

pwm: bcm2835: Fix NPD in suspend/resume

When 119a508c ("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 2ce7b7f6 ("pwm: bcm2835:
Simplify using devm functions") removed that call which would now cause
a NPD in bcm2835_pwm_{suspend,resume} as a consequence.

Fixes: 119a508c ("pwm: bcm2835: Add support for suspend/resume")
Signed-off-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/linux-pwm/20231113164632.2439400-1-florian.fainelli@broadcom.comSigned-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
parent b85ea95d
...@@ -155,6 +155,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev) ...@@ -155,6 +155,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
pc->chip.ops = &bcm2835_pwm_ops; pc->chip.ops = &bcm2835_pwm_ops;
pc->chip.npwm = 2; pc->chip.npwm = 2;
platform_set_drvdata(pdev, pc);
ret = devm_pwmchip_add(&pdev->dev, &pc->chip); ret = devm_pwmchip_add(&pdev->dev, &pc->chip);
if (ret < 0) if (ret < 0)
return dev_err_probe(&pdev->dev, ret, return dev_err_probe(&pdev->dev, ret,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment