Commit c996b937 authored by Thomas Pugliese's avatar Thomas Pugliese Committed by Greg Kroah-Hartman

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: default avatarThomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cd84f009
...@@ -59,6 +59,7 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg, ...@@ -59,6 +59,7 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg,
struct uwb_rceb *reply, ssize_t reply_size) struct uwb_rceb *reply, ssize_t reply_size)
{ {
struct uwb_rc_evt_set_drp_ie *r = (struct uwb_rc_evt_set_drp_ie *)reply; struct uwb_rc_evt_set_drp_ie *r = (struct uwb_rc_evt_set_drp_ie *)reply;
unsigned long flags;
if (r != NULL) { if (r != NULL) {
if (r->bResultCode != UWB_RC_RES_SUCCESS) 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,14 +68,14 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg,
} else } else
dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n"); dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n");
spin_lock_irq(&rc->rsvs_lock); spin_lock_irqsave(&rc->rsvs_lock, flags);
if (rc->set_drp_ie_pending > 1) { if (rc->set_drp_ie_pending > 1) {
rc->set_drp_ie_pending = 0; rc->set_drp_ie_pending = 0;
uwb_rsv_queue_update(rc); uwb_rsv_queue_update(rc);
} else { } else {
rc->set_drp_ie_pending = 0; rc->set_drp_ie_pending = 0;
} }
spin_unlock_irq(&rc->rsvs_lock); spin_unlock_irqrestore(&rc->rsvs_lock, flags);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment