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>
2 files changed