Module: xenomai-rpm
Branch: master
Commit: 934e1fccc42f21122d226458803a10c193125383
URL:    
http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=934e1fccc42f21122d226458803a10c193125383

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Aug  2 09:54:26 2012 +0200

wrappers: make ioctl() return type conditional

---

 include/asm-generic/wrappers.h |    4 ++--
 ksrc/nucleus/heap.c            |    2 +-
 ksrc/nucleus/pipe.c            |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index 4607d3d..c1ae369 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -603,11 +603,11 @@ static inline void wrap_proc_dir_entry_owner(struct 
proc_dir_entry *entry)
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
 #define unlocked_ioctl ioctl
 #define DECLARE_IOCTL_HANDLER(name, filp, cmd, arg)            \
-       name(struct inode *__inode__, struct file *filp,        \
+       int name(struct inode *__inode__, struct file *filp,    \
             unsigned int cmd, unsigned long arg)
 #else
 #define DECLARE_IOCTL_HANDLER(name, filp, cmd, arg)            \
-       name(struct file *filp, unsigned int cmd, unsigned long arg)
+       long name(struct file *filp, unsigned int cmd, unsigned long arg)
 #endif
 
 #ifndef DEFINE_SEMAPHORE
diff --git a/ksrc/nucleus/heap.c b/ksrc/nucleus/heap.c
index 3562bed..18b9a3a 100644
--- a/ksrc/nucleus/heap.c
+++ b/ksrc/nucleus/heap.c
@@ -1127,7 +1127,7 @@ static inline struct xnheap *__validate_heap_addr(void 
*addr)
        return NULL;
 }
 
-static long DECLARE_IOCTL_HANDLER(xnheap_ioctl, file, cmd, arg)
+static DECLARE_IOCTL_HANDLER(xnheap_ioctl, file, cmd, arg)
 {
        file->private_data = (void *)arg;
        return 0;
diff --git a/ksrc/nucleus/pipe.c b/ksrc/nucleus/pipe.c
index 1856124..30f63e8 100644
--- a/ksrc/nucleus/pipe.c
+++ b/ksrc/nucleus/pipe.c
@@ -923,7 +923,7 @@ static ssize_t xnpipe_write(struct file *file,
        return (ssize_t)count;
 }
 
-static long DECLARE_IOCTL_HANDLER(xnpipe_ioctl, file, cmd, arg)
+static DECLARE_IOCTL_HANDLER(xnpipe_ioctl, file, cmd, arg)
 {
        struct xnpipe_state *state = file->private_data;
        int ret = 0;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to