lkml.org 
[lkml]   [2019]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH next 22/25] media: staging/imx7: Use dev_get_drvdata()
Date
Hi Kefeng,
Thanks for the patch.

On Tue 23 Apr 2019 at 08:50, Kefeng Wang wrote:
> Using dev_get_drvdata directly.
>
> Cc: Rui Miguel Silva <rmfrfs@gmail.com>

There was already a patch sent by Wolfram that does the same thing
[0].

Thanks anyway.

---
Cheers,
Rui

[0]: https://lore.kernel.org/linux-media/20190319163622.30607-1-wsa+renesas@sang-engineering.com/

> Cc: Steve Longerbeam <slongerbeam@gmail.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
> drivers/staging/media/imx/imx7-mipi-csis.c | 6 ++----
> 1 file 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 @@ static int mipi_csis_probe(struct platform_device *pdev)
>
> 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 @@ static int mipi_csis_pm_suspend(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 = 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;

\
 
 \ /
  Last update: 2019-04-23 10:35    [W:0.133 / U:19.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site