Commit 05afb1ac authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Inki Dae

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: default avatarAndrzej Hajda <a.hajda@samsung.com>
Reviewed-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 22e816f8
...@@ -1298,7 +1298,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id) ...@@ -1298,7 +1298,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
event_work->ippdrv = ippdrv; event_work->ippdrv = ippdrv;
event_work->buf_id[EXYNOS_DRM_OPS_DST] = buf_id; event_work->buf_id[EXYNOS_DRM_OPS_DST] = buf_id;
queue_work(ippdrv->event_workq, (struct work_struct *)event_work); queue_work(ippdrv->event_workq, &event_work->work);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
...@@ -1326,8 +1326,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id) ...@@ -1326,8 +1326,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id)
buf_id[EXYNOS_DRM_OPS_SRC]; buf_id[EXYNOS_DRM_OPS_SRC];
event_work->buf_id[EXYNOS_DRM_OPS_DST] = event_work->buf_id[EXYNOS_DRM_OPS_DST] =
buf_id[EXYNOS_DRM_OPS_DST]; buf_id[EXYNOS_DRM_OPS_DST];
queue_work(ippdrv->event_workq, queue_work(ippdrv->event_workq, &event_work->work);
(struct work_struct *)event_work);
} }
return IRQ_HANDLED; return IRQ_HANDLED;
......
...@@ -790,7 +790,7 @@ static void ipp_handle_cmd_work(struct device *dev, ...@@ -790,7 +790,7 @@ static void ipp_handle_cmd_work(struct device *dev,
cmd_work->ippdrv = ippdrv; cmd_work->ippdrv = ippdrv;
cmd_work->c_node = c_node; cmd_work->c_node = c_node;
queue_work(ctx->cmd_workq, (struct work_struct *)cmd_work); queue_work(ctx->cmd_workq, &cmd_work->work);
} }
static int ipp_queue_buf_with_run(struct device *dev, static int ipp_queue_buf_with_run(struct device *dev,
...@@ -1318,7 +1318,7 @@ static int ipp_stop_property(struct drm_device *drm_dev, ...@@ -1318,7 +1318,7 @@ static int ipp_stop_property(struct drm_device *drm_dev,
void ipp_sched_cmd(struct work_struct *work) void ipp_sched_cmd(struct work_struct *work)
{ {
struct drm_exynos_ipp_cmd_work *cmd_work = struct drm_exynos_ipp_cmd_work *cmd_work =
(struct drm_exynos_ipp_cmd_work *)work; container_of(work, struct drm_exynos_ipp_cmd_work, work);
struct exynos_drm_ippdrv *ippdrv; struct exynos_drm_ippdrv *ippdrv;
struct drm_exynos_ipp_cmd_node *c_node; struct drm_exynos_ipp_cmd_node *c_node;
struct drm_exynos_ipp_property *property; struct drm_exynos_ipp_property *property;
...@@ -1531,7 +1531,7 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv, ...@@ -1531,7 +1531,7 @@ static int ipp_send_event(struct exynos_drm_ippdrv *ippdrv,
void ipp_sched_event(struct work_struct *work) void ipp_sched_event(struct work_struct *work)
{ {
struct drm_exynos_ipp_event_work *event_work = struct drm_exynos_ipp_event_work *event_work =
(struct drm_exynos_ipp_event_work *)work; container_of(work, struct drm_exynos_ipp_event_work, work);
struct exynos_drm_ippdrv *ippdrv; struct exynos_drm_ippdrv *ippdrv;
struct drm_exynos_ipp_cmd_node *c_node; struct drm_exynos_ipp_cmd_node *c_node;
int ret; int ret;
......
...@@ -156,8 +156,7 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg) ...@@ -156,8 +156,7 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg)
event_work->ippdrv = ippdrv; event_work->ippdrv = ippdrv;
event_work->buf_id[EXYNOS_DRM_OPS_DST] = event_work->buf_id[EXYNOS_DRM_OPS_DST] =
rot->cur_buf_id[EXYNOS_DRM_OPS_DST]; rot->cur_buf_id[EXYNOS_DRM_OPS_DST];
queue_work(ippdrv->event_workq, queue_work(ippdrv->event_workq, &event_work->work);
(struct work_struct *)event_work);
} else { } else {
DRM_ERROR("the SFR is set illegally\n"); DRM_ERROR("the SFR is set illegally\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment