diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-04-19 16:06:13 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2018-04-30 10:40:57 +0200 |
commit | 692099cdcf275df272936b31c8409f2a5a1f7239 (patch) | |
tree | 4565f4ea933abf5a742911d2dfd8f98ec9ef0ce1 /drivers/pwm/pwm-rcar.c | |
parent | 735596ca8a1cd3de87f0ff05213bb2ee0495ccbd (diff) | |
download | linux-692099cdcf275df272936b31c8409f2a5a1f7239.tar.gz linux-692099cdcf275df272936b31c8409f2a5a1f7239.tar.bz2 linux-692099cdcf275df272936b31c8409f2a5a1f7239.zip |
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); #ifdef CONFIG_PM_SLEEP static struct pwm_device *rcar_pwm_dev_to_pwm_dev(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct rcar_pwm_chip *rcar_pwm = platform_get_drvdata(pdev); + struct rcar_pwm_chip *rcar_pwm = dev_get_drvdata(dev); struct pwm_chip *chip = &rcar_pwm->chip; return &chip->pwms[0]; |