video: adf: build fixes for 4.1
authorAmit Pundir <amit.pundir@linaro.org>
Mon, 6 Jul 2015 19:39:40 +0000 (01:09 +0530)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:53:24 +0000 (13:53 -0800)
commitb76c9134369e2163b9af4daa6ea1f77a39a065c5
tree3e6e00f503169eeec98a0cd50d5df401d35c4531
parentaaec4221bce2e926315fb71301a2a83f7149c8ad
video: adf: build fixes for 4.1

Couple of ADF build fixes for v4.1

adf/adf_fops.c fix:
get_unused_fd() is obsolete, use get_unused_fd_flags(O_CLOEXEC)
instead to allocate a default file descriptor. This fix is a
followup of upstream commit f938612dd97d "include/linux/file.h:
remove get_unused_fd() macro".

adf/adf_memblock.c fix:
Fix dma_buf_export() call. Based on mainline commit d8fbe341beb6
"dma-buf: cleanup dma_buf_export() to make it easily extensible".

Otherwise we run into following build failures:
----------
  CC      drivers/video/adf/adf_fops.o
  CC      drivers/video/adf/adf_memblock.o
drivers/video/adf/adf_memblock.c: In function ‘adf_memblock_export’:
drivers/video/adf/adf_memblock.c:154:2: warning: passing argument 1 of ‘dma_buf_export’ from incompatible pointer type [enabled by default]
In file included from drivers/video/adf/adf_memblock.c:15:0:
include/linux/dma-buf.h:211:17: note: expected ‘const struct dma_buf_export_info *’ but argument is of type ‘struct adf_memblock_pdata *’
drivers/video/adf/adf_memblock.c:154:2: error: too many arguments to function ‘dma_buf_export’
In file included from drivers/video/adf/adf_memblock.c:15:0:
include/linux/dma-buf.h:211:17: note: declared here
make[3]: *** [drivers/video/adf/adf_memblock.o] Error 1
make[3]: *** Waiting for unfinished jobs....
drivers/video/adf/adf_fops.c: In function ‘adf_device_post_config’:
drivers/video/adf/adf_fops.c:228:2: error: implicit declaration of function ‘get_unused_fd’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/video/adf/adf_fops.o] Error 1
make[2]: *** [drivers/video/adf] Error 2
make[2]: *** Waiting for unfinished jobs....
----------

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
drivers/video/adf/adf_fops.c
drivers/video/adf/adf_memblock.c