Module: xenomai-head
Branch: master
Commit: 937fe456f3ac0d68a560b715327f58f906a0859d
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=937fe456f3ac0d68a560b715327f58f906a0859d

Author: Wolfgang Grandegger <w...@denx.de>
Date:   Fri Sep 24 17:36:38 2010 +0200

nucleus: switch to ioctl_unlocked

---

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

diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index a7349db..0b88c60 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -597,4 +597,8 @@ static inline void wrap_proc_dir_entry_owner(struct 
proc_dir_entry *entry)
        raw_spin_unlock_irqrestore(&rthal_irq_descp(irq)->lock, flags)
 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
+#define unlocked_ioctl ioctl
+#endif
+
 #endif /* _XENO_ASM_GENERIC_WRAPPERS_H */
diff --git a/ksrc/nucleus/heap.c b/ksrc/nucleus/heap.c
index c237005..8e838c4 100644
--- a/ksrc/nucleus/heap.c
+++ b/ksrc/nucleus/heap.c
@@ -1127,8 +1127,7 @@ static inline struct xnheap *__validate_heap_addr(void 
*addr)
        return NULL;
 }
 
-static int xnheap_ioctl(struct inode *inode,
-                       struct file *file, unsigned int cmd, unsigned long arg)
+static long xnheap_ioctl(struct file *file, unsigned int cmd, unsigned long 
arg)
 {
        file->private_data = (void *)arg;
        return 0;
@@ -1369,7 +1368,7 @@ void xnheap_destroy_mapped(xnheap_t *heap,
 static struct file_operations xnheap_fops = {
        .owner = THIS_MODULE,
        .open = xnheap_open,
-       .ioctl = xnheap_ioctl,
+       .unlocked_ioctl = xnheap_ioctl,
        .mmap = xnheap_mmap,
        .get_unmapped_area = xnheap_get_unmapped_area
 };
diff --git a/ksrc/nucleus/pipe.c b/ksrc/nucleus/pipe.c
index b8abd56..36e7905 100644
--- a/ksrc/nucleus/pipe.c
+++ b/ksrc/nucleus/pipe.c
@@ -923,8 +923,7 @@ static ssize_t xnpipe_write(struct file *file,
        return (ssize_t)count;
 }
 
-static int xnpipe_ioctl(struct inode *inode,
-                       struct file *file, unsigned int cmd, unsigned long arg)
+static long xnpipe_ioctl(struct file *file, unsigned int cmd, unsigned long 
arg)
 {
        struct xnpipe_state *state = file->private_data;
        int ret = 0;
@@ -1068,7 +1067,7 @@ static struct file_operations xnpipe_fops = {
        .read = xnpipe_read,
        .write = xnpipe_write,
        .poll = xnpipe_poll,
-       .ioctl = xnpipe_ioctl,
+       .unlocked_ioctl = xnpipe_ioctl,
        .open = xnpipe_open,
        .release = xnpipe_release,
        .fasync = xnpipe_fasync


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to