diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-04-19 10:06:13 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2018-04-30 04:40:57 -0400 |
commit | 692099cdcf275df272936b31c8409f2a5a1f7239 (patch) | |
tree | 4565f4ea933abf5a742911d2dfd8f98ec9ef0ce1 /drivers/pwm/pwm-rcar.c | |
parent | 735596ca8a1cd3de87f0ff05213bb2ee0495ccbd (diff) |
pwm: simplify getting .drvdata
We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-rcar.c')
-rw-r--r-- | drivers/pwm/pwm-rcar.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-rcar.c b/drivers/pwm/pwm-rcar.c index 91d11f2e2fef..748f614d5375 100644 --- a/drivers/pwm/pwm-rcar.c +++ b/drivers/pwm/pwm-rcar.c | |||
@@ -261,8 +261,7 @@ MODULE_DEVICE_TABLE(of, rcar_pwm_of_table); | |||
261 | #ifdef CONFIG_PM_SLEEP | 261 | #ifdef CONFIG_PM_SLEEP |
262 | static struct pwm_device *rcar_pwm_dev_to_pwm_dev(struct device *dev) | 262 | static struct pwm_device *rcar_pwm_dev_to_pwm_dev(struct device *dev) |
263 | { | 263 | { |
264 | struct platform_device *pdev = to_platform_device(dev); | 264 | struct rcar_pwm_chip *rcar_pwm = dev_get_drvdata(dev); |
265 | struct rcar_pwm_chip *rcar_pwm = platform_get_drvdata(pdev); | ||
266 | struct pwm_chip *chip = &rcar_pwm->chip; | 265 | struct pwm_chip *chip = &rcar_pwm->chip; |
267 | 266 | ||
268 | return &chip->pwms[0]; | 267 | return &chip->pwms[0]; |