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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190423075020.173734-23-wangkefeng.wang@huawei.com>
Date:   Tue, 23 Apr 2019 15:50:17 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     <linux-kernel@...r.kernel.org>
CC:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Kefeng Wang <wangkefeng.wang@...wei.com>,
        Rui Miguel Silva <rmfrfs@...il.com>,
        "Steve Longerbeam" <slongerbeam@...il.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        NXP Linux Team <linux-imx@....com>,
        <linux-media@...r.kernel.org>
Subject: [PATCH next 22/25] media: staging/imx7: Use dev_get_drvdata()

Using dev_get_drvdata directly.

Cc: Rui Miguel Silva <rmfrfs@...il.com>
Cc: Steve Longerbeam <slongerbeam@...il.com>
Cc: Philipp Zabel <p.zabel@...gutronix.de>
Cc: NXP Linux Team <linux-imx@....com>
Cc: linux-media@...r.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.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;
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ