aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2009-01-23 07:57:20 -0500
committerDavid Vrabel <david.vrabel@csr.com>2009-01-23 07:57:20 -0500
commit8f5140a6a0b1a9aa79585b0008e88c5d266c5c1d (patch)
tree8a96101d3c20a60bd0f2527e556457e86f5e58fc /drivers
parentdff243f7cb3a2ebbb09093066c1bc4a90ff5b3a4 (diff)
uwb: lock rc->rsvs_lock with spin_lock_bh()
rc->rsvs_lock may be taken in a timer so lock it with spin_lock_bh(). Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/uwb/drp.c4
-rw-r--r--drivers/uwb/rsv.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c
index 2b4f9406789d..4f5ca99a04b9 100644
--- a/drivers/uwb/drp.c
+++ b/drivers/uwb/drp.c
@@ -66,14 +66,14 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg,
66 } else 66 } else
67 dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n"); 67 dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n");
68 68
69 spin_lock(&rc->rsvs_lock); 69 spin_lock_bh(&rc->rsvs_lock);
70 if (rc->set_drp_ie_pending > 1) { 70 if (rc->set_drp_ie_pending > 1) {
71 rc->set_drp_ie_pending = 0; 71 rc->set_drp_ie_pending = 0;
72 uwb_rsv_queue_update(rc); 72 uwb_rsv_queue_update(rc);
73 } else { 73 } else {
74 rc->set_drp_ie_pending = 0; 74 rc->set_drp_ie_pending = 0;
75 } 75 }
76 spin_unlock(&rc->rsvs_lock); 76 spin_unlock_bh(&rc->rsvs_lock);
77} 77}
78 78
79/** 79/**
diff --git a/drivers/uwb/rsv.c b/drivers/uwb/rsv.c
index 886f977cd2ea..6b76f4bb4cc7 100644
--- a/drivers/uwb/rsv.c
+++ b/drivers/uwb/rsv.c
@@ -870,7 +870,7 @@ void uwb_rsv_queue_update(struct uwb_rc *rc)
870 */ 870 */
871void uwb_rsv_sched_update(struct uwb_rc *rc) 871void uwb_rsv_sched_update(struct uwb_rc *rc)
872{ 872{
873 spin_lock(&rc->rsvs_lock); 873 spin_lock_bh(&rc->rsvs_lock);
874 if (!delayed_work_pending(&rc->rsv_update_work)) { 874 if (!delayed_work_pending(&rc->rsv_update_work)) {
875 if (rc->set_drp_ie_pending > 0) { 875 if (rc->set_drp_ie_pending > 0) {
876 rc->set_drp_ie_pending++; 876 rc->set_drp_ie_pending++;
@@ -879,7 +879,7 @@ void uwb_rsv_sched_update(struct uwb_rc *rc)
879 uwb_rsv_queue_update(rc); 879 uwb_rsv_queue_update(rc);
880 } 880 }
881unlock: 881unlock:
882 spin_unlock(&rc->rsvs_lock); 882 spin_unlock_bh(&rc->rsvs_lock);
883} 883}
884 884
885/* 885/*