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-5-wangkefeng.wang@huawei.com>
Date:   Tue, 23 Apr 2019 15:49:59 +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>,
        Inki Dae <inki.dae@...sung.com>,
        Joonyoung Shim <jy0922.shim@...sung.com>,
        Seung-Woo Kim <sw0312.kim@...sung.com>,
        "Kyungmin Park" <kyungmin.park@...sung.com>,
        David Airlie <airlied@...ux.ie>,
        "Daniel Vetter" <daniel@...ll.ch>,
        <dri-devel@...ts.freedesktop.org>,
        <linux-samsung-soc@...r.kernel.org>
Subject: [PATCH next 04/25] drm/exynos: Use dev_get_drvdata()

Using dev_get_drvdata directly.

Cc: Inki Dae <inki.dae@...sung.com>
Cc: Joonyoung Shim <jy0922.shim@...sung.com>
Cc: Seung-Woo Kim <sw0312.kim@...sung.com>
Cc: Kyungmin Park <kyungmin.park@...sung.com>
Cc: David Airlie <airlied@...ux.ie>
Cc: Daniel Vetter <daniel@...ll.ch>
Cc: dri-devel@...ts.freedesktop.org
Cc: linux-samsung-soc@...r.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c | 8 +++-----
 drivers/gpu/drm/exynos/exynos_drm_gsc.c  | 5 ++---
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 90dfea0aec4d..b166572f9a4a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -48,8 +48,6 @@ static unsigned int fimc_mask = 0xc;
 module_param_named(fimc_devs, fimc_mask, uint, 0644);
 MODULE_PARM_DESC(fimc_devs, "Alias mask for assigning FIMC devices to Exynos DRM");
 
-#define get_fimc_context(dev)	platform_get_drvdata(to_platform_device(dev))
-
 enum {
 	FIMC_CLK_LCLK,
 	FIMC_CLK_GATE,
@@ -1364,7 +1362,7 @@ static int fimc_probe(struct platform_device *pdev)
 static int fimc_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct fimc_context *ctx = get_fimc_context(dev);
+	struct fimc_context *ctx = dev_get_drvdata(dev);
 
 	component_del(dev, &fimc_component_ops);
 	pm_runtime_dont_use_autosuspend(dev);
@@ -1378,7 +1376,7 @@ static int fimc_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM
 static int fimc_runtime_suspend(struct device *dev)
 {
-	struct fimc_context *ctx = get_fimc_context(dev);
+	struct fimc_context *ctx = dev_get_drvdata(dev);
 
 	DRM_DEBUG_KMS("id[%d]\n", ctx->id);
 	clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]);
@@ -1387,7 +1385,7 @@ static int fimc_runtime_suspend(struct device *dev)
 
 static int fimc_runtime_resume(struct device *dev)
 {
-	struct fimc_context *ctx = get_fimc_context(dev);
+	struct fimc_context *ctx = dev_get_drvdata(dev);
 
 	DRM_DEBUG_KMS("id[%d]\n", ctx->id);
 	return clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index f048d97fe9e2..0c1e345834bc 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -62,7 +62,6 @@
 #define GSC_COEF_DEPTH	3
 #define GSC_AUTOSUSPEND_DELAY		2000
 
-#define get_gsc_context(dev)	platform_get_drvdata(to_platform_device(dev))
 #define gsc_read(offset)		readl(ctx->regs + (offset))
 #define gsc_write(cfg, offset)	writel(cfg, ctx->regs + (offset))
 
@@ -1321,7 +1320,7 @@ static int gsc_remove(struct platform_device *pdev)
 
 static int __maybe_unused gsc_runtime_suspend(struct device *dev)
 {
-	struct gsc_context *ctx = get_gsc_context(dev);
+	struct gsc_context *ctx = dev_get_drvdata(dev);
 	int i;
 
 	DRM_DEBUG_KMS("id[%d]\n", ctx->id);
@@ -1334,7 +1333,7 @@ static int __maybe_unused gsc_runtime_suspend(struct device *dev)
 
 static int __maybe_unused gsc_runtime_resume(struct device *dev)
 {
-	struct gsc_context *ctx = get_gsc_context(dev);
+	struct gsc_context *ctx = dev_get_drvdata(dev);
 	int i, ret;
 
 	DRM_DEBUG_KMS("id[%d]\n", ctx->id);
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ