summaryrefslogtreecommitdiff
authorMatthew Shyu <matthew.shyu@amlogic.com>2017-05-24 08:22:32 (GMT)
committer Matthew Shyu <matthew.shyu@amlogic.com>2017-05-24 08:22:32 (GMT)
commit4d0c86441bb9519fcc07529089dfc252e8c3393c (patch)
tree3d63974a3917a75368c3c759834585ddff4aafff
parent700b5efe1ee88f8c5bc3a4d195f5464daefda312 (diff)
downloadtdk-4d0c86441bb9519fcc07529089dfc252e8c3393c.zip
tdk-4d0c86441bb9519fcc07529089dfc252e8c3393c.tar.gz
tdk-4d0c86441bb9519fcc07529089dfc252e8c3393c.tar.bz2
fix compilation error on gcc6
Change-Id: I5f853412acf5d89c7e6d877c251ca9e1d46a2407
Diffstat
-rw-r--r--linuxdriver/tee_shm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linuxdriver/tee_shm.c b/linuxdriver/tee_shm.c
index fec4443..e5b7ea2 100644
--- a/linuxdriver/tee_shm.c
+++ b/linuxdriver/tee_shm.c
@@ -219,6 +219,9 @@ struct tee_shm *tee_shm_register_fd(struct tee_context *ctx, int fd)
{
struct tee_shm_dmabuf_ref *ref;
void *rc;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,16))
+ DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
+#endif
if (!tee_device_get(ctx->teedev))
return ERR_PTR(-EINVAL);
@@ -269,8 +272,6 @@ struct tee_shm *tee_shm_register_fd(struct tee_context *ctx, int fd)
goto err;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,16))
- DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
-
/* export a dmabuf to later get a userland ref */
exp_info.ops = &tee_shm_dma_buf_ops;
exp_info.size = ref->shm.size;