diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-04-19 17:05:56 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-04 18:43:11 +0300 |
commit | 2473394343c338426689476aec42790e6d40731c (patch) | |
tree | 4add7057bc0374bf12f0e78930f8d84be019a0e6 /drivers/media/platform/exynos4-is/mipi-csis.c | |
parent | 010b876ae9a05307c138cd591555fcd8a0a0bf14 (diff) | |
download | linux-2473394343c338426689476aec42790e6d40731c.tar.xz |
media: platform: exynos4-is: 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: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/exynos4-is/mipi-csis.c')
-rw-r--r-- | drivers/media/platform/exynos4-is/mipi-csis.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c index cba46a656338..b4e28a299e26 100644 --- a/drivers/media/platform/exynos4-is/mipi-csis.c +++ b/drivers/media/platform/exynos4-is/mipi-csis.c @@ -891,8 +891,7 @@ e_clkput: static int s5pcsis_pm_suspend(struct device *dev, bool runtime) { - struct platform_device *pdev = to_platform_device(dev); - struct v4l2_subdev *sd = platform_get_drvdata(pdev); + struct v4l2_subdev *sd = dev_get_drvdata(dev); struct csis_state *state = sd_to_csis_state(sd); int ret = 0; @@ -921,8 +920,7 @@ static int s5pcsis_pm_suspend(struct device *dev, bool runtime) static int s5pcsis_pm_resume(struct device *dev, bool runtime) { - struct platform_device *pdev = to_platform_device(dev); - struct v4l2_subdev *sd = platform_get_drvdata(pdev); + struct v4l2_subdev *sd = dev_get_drvdata(dev); struct csis_state *state = sd_to_csis_state(sd); int ret = 0; |