lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3y359vcbs.fsf@gmail.com>
Date:   Wed, 20 Mar 2019 14:40:23 +0000
From:   Rui Miguel Silva <rmfrfs@...il.com>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        Steve Longerbeam <slongerbeam@...il.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/1] staging: media: imx: imx7-mipi-csis: simplify getting .driver_data

Hi Wolfram,
Thanks for the patch.
On Tue 19 Mar 2019 at 16:36, Wolfram Sang wrote:
> 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@...g-engineering.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@...il.com>

---
Cheers,
	Rui

> ---
>
> Build tested only. buildbot is happy.
>
>  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 2ddcc42ab8ff..44569c63e4de 100644
> --- a/drivers/staging/media/imx/imx7-mipi-csis.c
> +++ b/drivers/staging/media/imx/imx7-mipi-csis.c
> @@ -1039,8 +1039,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;
>  
> @@ -1064,8 +1063,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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ