diff options
author | Thomas Pugliese <thomas.pugliese@gmail.com> | 2014-04-23 15:42:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-24 15:45:40 -0400 |
commit | c996b9379180ee578b9ea208bb4f197201bbb023 (patch) | |
tree | f0dc1591a2906562c00505c08c392360aa8c6db7 /drivers/uwb | |
parent | cd84f009e98b3aa6109503f80f66ccf3e19e8fa9 (diff) |
uwb: don't call spin_unlock_irq in a USB completion handler
This patch converts the use of spin_lock_irq/spin_unlock_irq to
spin_lock_irqsave/spin_unlock_irqrestore in uwb_rc_set_drp_cmd_done
which is called from a USB completion handler. There are also
whitespace cleanups to make checkpatch.pl happy.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uwb')
-rw-r--r-- | drivers/uwb/drp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c index 1a2fd9795367..468c89fb6a16 100644 --- a/drivers/uwb/drp.c +++ b/drivers/uwb/drp.c | |||
@@ -59,6 +59,7 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg, | |||
59 | struct uwb_rceb *reply, ssize_t reply_size) | 59 | struct uwb_rceb *reply, ssize_t reply_size) |
60 | { | 60 | { |
61 | struct uwb_rc_evt_set_drp_ie *r = (struct uwb_rc_evt_set_drp_ie *)reply; | 61 | struct uwb_rc_evt_set_drp_ie *r = (struct uwb_rc_evt_set_drp_ie *)reply; |
62 | unsigned long flags; | ||
62 | 63 | ||
63 | if (r != NULL) { | 64 | if (r != NULL) { |
64 | if (r->bResultCode != UWB_RC_RES_SUCCESS) | 65 | if (r->bResultCode != UWB_RC_RES_SUCCESS) |
@@ -67,14 +68,14 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg, | |||
67 | } else | 68 | } else |
68 | dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n"); | 69 | dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n"); |
69 | 70 | ||
70 | spin_lock_irq(&rc->rsvs_lock); | 71 | spin_lock_irqsave(&rc->rsvs_lock, flags); |
71 | if (rc->set_drp_ie_pending > 1) { | 72 | if (rc->set_drp_ie_pending > 1) { |
72 | rc->set_drp_ie_pending = 0; | 73 | rc->set_drp_ie_pending = 0; |
73 | uwb_rsv_queue_update(rc); | 74 | uwb_rsv_queue_update(rc); |
74 | } else { | 75 | } else { |
75 | rc->set_drp_ie_pending = 0; | 76 | rc->set_drp_ie_pending = 0; |
76 | } | 77 | } |
77 | spin_unlock_irq(&rc->rsvs_lock); | 78 | spin_unlock_irqrestore(&rc->rsvs_lock, flags); |
78 | } | 79 | } |
79 | 80 | ||
80 | /** | 81 | /** |