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-16-wangkefeng.wang@huawei.com>
Date:   Tue, 23 Apr 2019 15:50:10 +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>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Benson Leung <bleung@...omium.org>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        <linux-media@...r.kernel.org>
Subject: [PATCH next 15/25] media: platform: Use dev_get_drvdata()

Using dev_get_drvdata directly.

Cc: Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: Benson Leung <bleung@...omium.org>
Cc: Enric Balletbo i Serra <enric.balletbo@...labora.com>
Cc: linux-media@...r.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
---
 drivers/media/platform/cros-ec-cec/cros-ec-cec.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
index 7bc4d8a9af28..2e218c7a3a1f 100644
--- a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
+++ b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c
@@ -174,8 +174,7 @@ static const struct cec_adap_ops cros_ec_cec_ops = {
 #ifdef CONFIG_PM_SLEEP
 static int cros_ec_cec_suspend(struct device *dev)
 {
-	struct platform_device *pdev = to_platform_device(dev);
-	struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(&pdev->dev);
+	struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(dev);
 
 	if (device_may_wakeup(dev))
 		enable_irq_wake(cros_ec_cec->cros_ec->irq);
@@ -185,8 +184,7 @@ static int cros_ec_cec_suspend(struct device *dev)
 
 static int cros_ec_cec_resume(struct device *dev)
 {
-	struct platform_device *pdev = to_platform_device(dev);
-	struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(&pdev->dev);
+	struct cros_ec_cec *cros_ec_cec = dev_get_drvdata(dev);
 
 	if (device_may_wakeup(dev))
 		disable_irq_wake(cros_ec_cec->cros_ec->irq);
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ