[PATCH next 04/25] drm/exynos: Use dev_get_drvdata()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Using dev_get_drvdata directly.

Cc: Inki Dae <inki.dae@xxxxxxxxxxx>
Cc: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>
Cc: Seung-Woo Kim <sw0312.kim@xxxxxxxxxxx>
Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
Cc: David Airlie <airlied@xxxxxxxx>
Cc: Daniel Vetter <daniel@xxxxxxxx>
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: linux-samsung-soc@xxxxxxxxxxxxxxx
Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux