Skip to content

Commit

Permalink
usb: uwb: use correct locking calls for rc data
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
TomServo3000 authored and gregkh committed May 21, 2013
1 parent c0c6e07 commit 3138887
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/uwb/drp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions drivers/uwb/rsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand All @@ -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);
}

/*
Expand Down

0 comments on commit 3138887

Please sign in to comment.