summaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2017-08-21 08:42:56 +0200
committerThierry Reding <thierry.reding@gmail.com>2017-08-21 08:42:56 +0200
commitd870c80e1d1523e449e98d230ea048257123b7cb (patch)
tree1edc35d7481de30c2776b2df292950de552ce6f6 /drivers/pwm
parentd2c95e47f868322fe8c07495f1c589ebeb1c3fc9 (diff)
downloadlinux-d870c80e1d1523e449e98d230ea048257123b7cb.tar.gz
linux-d870c80e1d1523e449e98d230ea048257123b7cb.tar.bz2
linux-d870c80e1d1523e449e98d230ea048257123b7cb.zip
pwm: tiehrpwm: Set driver data before runtime PM enable
Runtime PM callbacks can be run right after runtime PM is enabled, so make sure to set the driver data before that. This is unlikely to ever happen with the current driver, but it doesn't hurt to follow best practices anyway. Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-tiehrpwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 6f87a0d5828d..4c22cb395040 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -498,9 +498,9 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev)
goto err_clk_unprepare;
}
+ platform_set_drvdata(pdev, pc);
pm_runtime_enable(&pdev->dev);
- platform_set_drvdata(pdev, pc);
return 0;
err_clk_unprepare: