summaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2017-08-21 08:31:37 +0200
committerThierry Reding <thierry.reding@gmail.com>2017-08-21 08:31:37 +0200
commit23f373e6fe7462df2d921eeced5d36da1244990e (patch)
tree4eeb3eb8c5020a22031eb346f3f59896698dfa0d /drivers/pwm
parent53c7972d6d39db96a3c68752a2ce8c7f6e0c73b4 (diff)
downloadlinux-23f373e6fe7462df2d921eeced5d36da1244990e.tar.gz
linux-23f373e6fe7462df2d921eeced5d36da1244990e.tar.bz2
linux-23f373e6fe7462df2d921eeced5d36da1244990e.zip
pwm: tiecap: 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-tiecap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
index 635408af2cf0..34b228626bd5 100644
--- a/drivers/pwm/pwm-tiecap.c
+++ b/drivers/pwm/pwm-tiecap.c
@@ -254,9 +254,9 @@ static int ecap_pwm_probe(struct platform_device *pdev)
return ret;
}
+ platform_set_drvdata(pdev, pc);
pm_runtime_enable(&pdev->dev);
- platform_set_drvdata(pdev, pc);
return 0;
}