aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-03-19 12:36:22 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-04-22 10:59:47 -0400
commit27c8e733c03812173380d55049b886db4dc89fe5 (patch)
tree93be1209a20f71b1977769ffc1ebf2b226ce5171 /drivers/staging/media
parentmedia: vimc: propagate pixel format in the stream (diff)
downloadlinux-dev-27c8e733c03812173380d55049b886db4dc89fe5.tar.xz
linux-dev-27c8e733c03812173380d55049b886db4dc89fe5.zip
media: staging: media: imx: imx7-mipi-csis: simplify getting .driver_data
We should get 'driver_data' 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> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/imx/imx7-mipi-csis.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
index 6cae2960eea1..19455f425416 100644
--- a/drivers/staging/media/imx/imx7-mipi-csis.c
+++ b/drivers/staging/media/imx/imx7-mipi-csis.c
@@ -1027,8 +1027,7 @@ disable_clock:
static int mipi_csis_pm_suspend(struct device *dev, bool runtime)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev);
+ struct v4l2_subdev *mipi_sd = dev_get_drvdata(dev);
struct csi_state *state = mipi_sd_to_csis_state(mipi_sd);
int ret = 0;
@@ -1052,8 +1051,7 @@ unlock:
static int mipi_csis_pm_resume(struct device *dev, bool runtime)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev);
+ struct v4l2_subdev *mipi_sd = dev_get_drvdata(dev);
struct csi_state *state = mipi_sd_to_csis_state(mipi_sd);
int ret = 0;