get_unused_fd() was changed to get_unused_fd_flags() by the commit
1a7bd2265fc5 ("make get_unused_fd_flags() a function"), so it causes
build error,
drivers/gpu/arm/mali400/r5p2_rel0/linux/mali_sync.c: In function 'mali_sync_fence_fd_alloc':
drivers/gpu/arm/mali400/r5p2_rel0/linux/mali_sync.c:235:2: error: implicit declaration of function 'get_unused_fd' [-Werror=implicit-function-declaration]
fd = get_unused_fd();
^
This patch was refered from the commit
45acea57335e ("android/sw_sync:
use get_unused_fd_flags(O_CLOEXEC) instead of get_unused_fd()")
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
#include "mali_kernel_common.h"
#include "mali_timeline.h"
+#include <linux/fcntl.h>
#include <linux/file.h>
#include <linux/seq_file.h>
#include <linux/module.h>
{
s32 fd = -1;
- fd = get_unused_fd();
+ fd = get_unused_fd_flags(O_CLOEXEC);
if (fd < 0) {
sync_fence_put(sync_fence);
return -1;