Skip to content

Commit

Permalink
pwm: bcm2835: Fix NPD in suspend/resume
Browse files Browse the repository at this point in the history
When 119a508 ("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 2ce7b7f ("pwm: bcm2835:
Simplify using devm functions") removed that call which would now cause
a NPD in bcm2835_pwm_{suspend,resume} as a consequence.

Fixes: 119a508 ("pwm: bcm2835: Add support for suspend/resume")
Signed-off-by: Florian Fainelli <[email protected]>
Reviewed-by: Uwe Kleine-König <[email protected]>
Link: https://lore.kernel.org/linux-pwm/[email protected]
Signed-off-by: Uwe Kleine-König <[email protected]>
  • Loading branch information
ffainelli authored and Uwe Kleine-König committed Nov 21, 2023
1 parent b85ea95 commit 4e7a8db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/pwm/pwm-bcm2835.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4e7a8db

Please sign in to comment.