Commit 27c8e733 authored by Wolfram Sang's avatar Wolfram Sang Committed by Mauro Carvalho Chehab

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent b6c61a6c
...@@ -1027,8 +1027,7 @@ static int mipi_csis_probe(struct platform_device *pdev) ...@@ -1027,8 +1027,7 @@ static int mipi_csis_probe(struct platform_device *pdev)
static int mipi_csis_pm_suspend(struct device *dev, bool runtime) static int mipi_csis_pm_suspend(struct device *dev, bool runtime)
{ {
struct platform_device *pdev = to_platform_device(dev); struct v4l2_subdev *mipi_sd = dev_get_drvdata(dev);
struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev);
struct csi_state *state = mipi_sd_to_csis_state(mipi_sd); struct csi_state *state = mipi_sd_to_csis_state(mipi_sd);
int ret = 0; int ret = 0;
...@@ -1052,8 +1051,7 @@ static int mipi_csis_pm_suspend(struct device *dev, bool runtime) ...@@ -1052,8 +1051,7 @@ static int mipi_csis_pm_suspend(struct device *dev, bool runtime)
static int mipi_csis_pm_resume(struct device *dev, bool runtime) static int mipi_csis_pm_resume(struct device *dev, bool runtime)
{ {
struct platform_device *pdev = to_platform_device(dev); struct v4l2_subdev *mipi_sd = dev_get_drvdata(dev);
struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev);
struct csi_state *state = mipi_sd_to_csis_state(mipi_sd); struct csi_state *state = mipi_sd_to_csis_state(mipi_sd);
int ret = 0; int ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment