Module: xenomai-3
Branch: next
Commit: b82b83556b147741c31187595412ba203de1fcf3
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=b82b83556b147741c31187595412ba203de1fcf3

Author: Jorge Ramirez-Ortiz <j...@xenomai.org>
Date:   Thu Aug 14 13:41:50 2014 -0400

drivers/analogy: remove unnecessary lock

---

 kernel/drivers/analogy/transfer.c |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/kernel/drivers/analogy/transfer.c 
b/kernel/drivers/analogy/transfer.c
index 2594f00..bf19c8c 100644
--- a/kernel/drivers/analogy/transfer.c
+++ b/kernel/drivers/analogy/transfer.c
@@ -154,26 +154,17 @@ int a4l_request_irq(struct a4l_device * dev,
                    unsigned long flags, void *cookie)
 {
        int ret;
-       unsigned long __flags;
 
        if (dev->transfer.irq_desc.irq != A4L_IRQ_UNUSED)
                return -EBUSY;
 
-       /* A spinlock is used so as to prevent race conditions
-          on the field "irq" of the IRQ descriptor
-          (even if such a case is bound not to happen) */
-       rtdm_lock_get_irqsave(&dev->lock, __flags);
-
-       ret = __a4l_request_irq(&dev->transfer.irq_desc,
-                               irq, handler, flags, cookie);
-
+       ret = __a4l_request_irq(&dev->transfer.irq_desc, irq, handler, flags,
+               cookie);
        if (ret != 0) {
                __a4l_err("a4l_request_irq: IRQ registration failed\n");
                dev->transfer.irq_desc.irq = A4L_IRQ_UNUSED;
        }
 
-       rtdm_lock_put_irqrestore(&dev->lock, __flags);
-
        return ret;
 }
 


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

Reply via email to