]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: uwb: use correct locking calls for rc data
authortpugliese <thomas.pugliese@gmail.com>
Mon, 20 May 2013 20:09:05 +0000 (15:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2013 18:48:03 +0000 (11:48 -0700)
The rc object's members can be accessed from both a timer and URB
callback.  Use spin_*_irq instead of spin_*_bh.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uwb/drp.c
drivers/uwb/rsv.c

index 3fbcf789dfaad71ec81f5f3b9e8776ec18abaa26..16ada8341c46dedb907df45392e669d42f967dec 100644 (file)
@@ -67,14 +67,14 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg,
        } else
                dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n");
 
-       spin_lock_bh(&rc->rsvs_lock);
+       spin_lock_irq(&rc->rsvs_lock);
        if (rc->set_drp_ie_pending > 1) {
                rc->set_drp_ie_pending = 0;
                uwb_rsv_queue_update(rc);       
        } else {
                rc->set_drp_ie_pending = 0;     
        }
-       spin_unlock_bh(&rc->rsvs_lock);
+       spin_unlock_irq(&rc->rsvs_lock);
 }
 
 /**
index f4ae05f78c42bc5c20753af530cac27331d92ba7..738e8a8cb811ddd86097e2a1f180cec96057e6ea 100644 (file)
@@ -872,7 +872,7 @@ void uwb_rsv_queue_update(struct uwb_rc *rc)
  */
 void uwb_rsv_sched_update(struct uwb_rc *rc)
 {
-       spin_lock_bh(&rc->rsvs_lock);
+       spin_lock_irq(&rc->rsvs_lock);
        if (!delayed_work_pending(&rc->rsv_update_work)) {
                if (rc->set_drp_ie_pending > 0) {
                        rc->set_drp_ie_pending++;
@@ -881,7 +881,7 @@ void uwb_rsv_sched_update(struct uwb_rc *rc)
                uwb_rsv_queue_update(rc);
        }
 unlock:
-       spin_unlock_bh(&rc->rsvs_lock);
+       spin_unlock_irq(&rc->rsvs_lock);
 }
 
 /*