aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2014-08-28 05:07:33 -0400
committerInki Dae <daeinki@gmail.com>2014-09-19 11:56:12 -0400
commit05afb1ac5391a65b0f7e024064ab8f56397f6559 (patch)
tree04ff991482432c71ae1df4359ba3b4a6b4c69a75
parent22e816f87cb0c0a4e507ec7a26cb08bfeef2daa4 (diff)
drm/exynos/ipp: replace work_struct casting with better constructs
Type casting should be avoided if possible. In case of work_struct it can be simply replaced by reference to member field. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimc.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gsc.c3
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_ipp.c6
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_rotator.c3
4 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index ec7cc9ea50df..7a5338ed2433 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -1298,7 +1298,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
1298 1298
1299 event_work->ippdrv = ippdrv; 1299 event_work->ippdrv = ippdrv;
1300 event_work->buf_id[EXYNOS_DRM_OPS_DST] = buf_id; 1300 event_work->buf_id[EXYNOS_DRM_OPS_DST] = buf_id;
1301 queue_work(ippdrv->event_workq, (struct work_struct *)event_work); 1301 queue_work(ippdrv->event_workq, &event_work->work);
1302 1302
1303 return IRQ_HANDLED; 1303 return IRQ_HANDLED;
1304} 1304}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index 9e3ff1672965..c6a013fc321c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -1326,8 +1326,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id)
1326 buf_id[EXYNOS_DRM_OPS_SRC]; 1326 buf_id[EXYNOS_DRM_OPS_SRC];
1327 event_work->buf_id[EXYNOS_DRM_OPS_DST] = 1327 event_work->buf_id[EXYNOS_DRM_OPS_DST] =
1328 buf_id[EXYNOS_DRM_OPS_DST]; 1328 buf_id[EXYNOS_DRM_OPS_DST];
1329 queue_work(ippdrv->event_workq, 1329 queue_work(ippdrv->event_workq, &event_work->work);
1330 (struct work_struct *)event_work);
1331 } 1330 }
1332 1331
1333 return IRQ_HANDLED; 1332 return IRQ_HANDLED;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index 857817cc9b4a..fff3509f7b97 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -790,7 +790,7 @@ static void ipp_handle_cmd_work(struct device *dev,
790 790
791 cmd_work->ippdrv = ippdrv; 791 cmd_work->ippdrv = ippdrv;
792 cmd_work->c_node = c_node; 792 cmd_work->c_node = c_node;
793 queue_work(ctx->cmd_workq, (struct work_struct *)cmd_work); 793 queue_work(ctx->cmd_workq, &cmd_work->work);
794} 794}
795 795
796static int ipp_queue_buf_with_run(struct device *dev, 796static int ipp_queue_buf_with_run(struct device *dev,
@@ -1318,7 +1318,7 @@ err_clear:
1318void ipp_sched_cmd(struct work_struct *work) 1318void ipp_sched_cmd(struct work_struct *work)
1319{ 1319{
1320 struct drm_exynos_ipp_cmd_work *cmd_work = 1320 struct drm_exynos_ipp_cmd_work *cmd_work =
1321 (struct drm_exynos_ipp_cmd_work *)work; 1321 container_of(work, struct drm_exynos_ipp_cmd_work, work);
1322 struct exynos_drm_ippdrv *ippdrv; 1322 struct exynos_drm_ippdrv *ippdrv;
1323 struct drm_exynos_ipp_cmd_node *c_node; 1323 struct drm_exynos_ipp_cmd_node *c_node;
1324 struct drm_exynos_ipp_property *property; 1324 struct drm_exynos_ipp_property *property;
@@ -1531,7 +1531,7 @@ err_event_unlock:
1531void ipp_sched_event(struct work_struct *work) 1531void ipp_sched_event(struct work_struct *work)
1532{ 1532{
1533 struct drm_exynos_ipp_event_work *event_work = 1533 struct drm_exynos_ipp_event_work *event_work =
1534 (struct drm_exynos_ipp_event_work *)work; 1534 container_of(work, struct drm_exynos_ipp_event_work, work);
1535 struct exynos_drm_ippdrv *ippdrv; 1535 struct exynos_drm_ippdrv *ippdrv;
1536 struct drm_exynos_ipp_cmd_node *c_node; 1536 struct drm_exynos_ipp_cmd_node *c_node;
1537 int ret; 1537 int ret;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index 55af6b41c1df..b6a37d4f5b13 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -156,8 +156,7 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg)
156 event_work->ippdrv = ippdrv; 156 event_work->ippdrv = ippdrv;
157 event_work->buf_id[EXYNOS_DRM_OPS_DST] = 157 event_work->buf_id[EXYNOS_DRM_OPS_DST] =
158 rot->cur_buf_id[EXYNOS_DRM_OPS_DST]; 158 rot->cur_buf_id[EXYNOS_DRM_OPS_DST];
159 queue_work(ippdrv->event_workq, 159 queue_work(ippdrv->event_workq, &event_work->work);
160 (struct work_struct *)event_work);
161 } else { 160 } else {
162 DRM_ERROR("the SFR is set illegally\n"); 161 DRM_ERROR("the SFR is set illegally\n");
163 } 162 }