aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uwb/drp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/uwb/drp.c')
-rw-r--r--drivers/uwb/drp.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c
index 16ada8341c46..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/**
@@ -599,8 +600,11 @@ static void uwb_drp_handle_alien_drp(struct uwb_rc *rc, struct uwb_ie_drp *drp_i
599 600
600 /* alloc and initialize new uwb_cnflt_alien */ 601 /* alloc and initialize new uwb_cnflt_alien */
601 cnflt = kzalloc(sizeof(struct uwb_cnflt_alien), GFP_KERNEL); 602 cnflt = kzalloc(sizeof(struct uwb_cnflt_alien), GFP_KERNEL);
602 if (!cnflt) 603 if (!cnflt) {
603 dev_err(dev, "failed to alloc uwb_cnflt_alien struct\n"); 604 dev_err(dev, "failed to alloc uwb_cnflt_alien struct\n");
605 return;
606 }
607
604 INIT_LIST_HEAD(&cnflt->rc_node); 608 INIT_LIST_HEAD(&cnflt->rc_node);
605 init_timer(&cnflt->timer); 609 init_timer(&cnflt->timer);
606 cnflt->timer.function = uwb_cnflt_timer; 610 cnflt->timer.function = uwb_cnflt_timer;