summaryrefslogtreecommitdiff
path: root/exynos
diff options
context:
space:
mode:
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>2015-03-16 22:19:28 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2015-03-16 22:21:03 +0000
commit736d6a1f0f8292fe3f3d0b38f5d69b8693767537 (patch)
treeae3d2f5fba719895702ea280d8e3ac79146ca89f /exynos
parent89037326ca6012ba18be29dc6587e11617164400 (diff)
exynos: use structure initialization instead of memset
Keeps the code cleaner, since the structs have to be initialized once anyway. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Inki Dae <inki.dae@samsung.com> Tested-by: Joonyoung Shim <jy0922.shim@samsung.com> [evelikov: squash trivial conflict] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Conflicts: tests/exynos/exynos_fimg2d_test.c
Diffstat (limited to 'exynos')
-rw-r--r--exynos/exynos_fimg2d.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 5f9e9a71..aecd1c3a 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -188,7 +188,7 @@ static void g2d_reset(struct g2d_context *ctx)
static int g2d_flush(struct g2d_context *ctx)
{
int ret;
- struct drm_exynos_g2d_set_cmdlist cmdlist;
+ struct drm_exynos_g2d_set_cmdlist cmdlist = {0};
if (ctx->cmd_nr == 0 && ctx->cmd_buf_nr == 0)
return -1;
@@ -198,8 +198,6 @@ static int g2d_flush(struct g2d_context *ctx)
return -EINVAL;
}
- memset(&cmdlist, 0, sizeof(struct drm_exynos_g2d_set_cmdlist));
-
cmdlist.cmd = (uint64_t)(uintptr_t)&ctx->cmd[0];
cmdlist.cmd_buf = (uint64_t)(uintptr_t)&ctx->cmd_buf[0];
cmdlist.cmd_nr = ctx->cmd_nr;