ARM: mali400: r5p2_rel0: use get_unused_fd_flags(O_CLOEXEC) instead of get_unused_fd()
authorJoonyoung Shim <jy0922.shim@samsung.com>
Thu, 7 Jul 2016 05:02:21 +0000 (14:02 +0900)
committerJoonyoung Shim <jy0922.shim@samsung.com>
Thu, 7 Jul 2016 06:40:03 +0000 (15:40 +0900)
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>
drivers/gpu/arm/mali400/r5p2_rel0/linux/mali_sync.c

index 6feb902706d8500bc7001b5085e61eea5a76c2a1..825971dc40a01c396590bfc931a7970152bbb19f 100644 (file)
@@ -14,6 +14,7 @@
 #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>
@@ -232,7 +233,7 @@ s32 mali_sync_fence_fd_alloc(struct sync_fence *sync_fence)
 {
        s32 fd = -1;
 
-       fd = get_unused_fd();
+       fd = get_unused_fd_flags(O_CLOEXEC);
        if (fd < 0) {
                sync_fence_put(sync_fence);
                return -1;