aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uwb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/uwb')
-rw-r--r--drivers/uwb/drp.c4
-rw-r--r--drivers/uwb/est.c7
-rw-r--r--drivers/uwb/hwa-rc.c6
-rw-r--r--drivers/uwb/pal.c2
-rw-r--r--drivers/uwb/rsv.c4
-rw-r--r--drivers/uwb/uwb-internal.h3
-rw-r--r--drivers/uwb/whci.c14
7 files changed, 18 insertions, 22 deletions
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c
index 3fbcf789dfaa..16ada8341c46 100644
--- a/drivers/uwb/drp.c
+++ b/drivers/uwb/drp.c
@@ -67,14 +67,14 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg,
67 } else 67 } else
68 dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n"); 68 dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n");
69 69
70 spin_lock_bh(&rc->rsvs_lock); 70 spin_lock_irq(&rc->rsvs_lock);
71 if (rc->set_drp_ie_pending > 1) { 71 if (rc->set_drp_ie_pending > 1) {
72 rc->set_drp_ie_pending = 0; 72 rc->set_drp_ie_pending = 0;
73 uwb_rsv_queue_update(rc); 73 uwb_rsv_queue_update(rc);
74 } else { 74 } else {
75 rc->set_drp_ie_pending = 0; 75 rc->set_drp_ie_pending = 0;
76 } 76 }
77 spin_unlock_bh(&rc->rsvs_lock); 77 spin_unlock_irq(&rc->rsvs_lock);
78} 78}
79 79
80/** 80/**
diff --git a/drivers/uwb/est.c b/drivers/uwb/est.c
index 86ed7e61e597..457f31d99bf4 100644
--- a/drivers/uwb/est.c
+++ b/drivers/uwb/est.c
@@ -436,7 +436,6 @@ ssize_t uwb_est_find_size(struct uwb_rc *rc, const struct uwb_rceb *rceb,
436 unsigned long flags; 436 unsigned long flags;
437 unsigned itr; 437 unsigned itr;
438 u16 type_event_high, event; 438 u16 type_event_high, event;
439 u8 *ptr = (u8 *) rceb;
440 439
441 read_lock_irqsave(&uwb_est_lock, flags); 440 read_lock_irqsave(&uwb_est_lock, flags);
442 size = -ENOSPC; 441 size = -ENOSPC;
@@ -453,12 +452,12 @@ ssize_t uwb_est_find_size(struct uwb_rc *rc, const struct uwb_rceb *rceb,
453 if (size != -ENOENT) 452 if (size != -ENOENT)
454 goto out; 453 goto out;
455 } 454 }
456 dev_dbg(dev, "event 0x%02x/%04x/%02x: no handlers available; " 455 dev_dbg(dev,
457 "RCEB %02x %02x %02x %02x\n", 456 "event 0x%02x/%04x/%02x: no handlers available; RCEB %4ph\n",
458 (unsigned) rceb->bEventType, 457 (unsigned) rceb->bEventType,
459 (unsigned) le16_to_cpu(rceb->wEvent), 458 (unsigned) le16_to_cpu(rceb->wEvent),
460 (unsigned) rceb->bEventContext, 459 (unsigned) rceb->bEventContext,
461 ptr[0], ptr[1], ptr[2], ptr[3]); 460 rceb);
462 size = -ENOENT; 461 size = -ENOENT;
463out: 462out:
464 read_unlock_irqrestore(&uwb_est_lock, flags); 463 read_unlock_irqrestore(&uwb_est_lock, flags);
diff --git a/drivers/uwb/hwa-rc.c b/drivers/uwb/hwa-rc.c
index 810c90ae2c55..0621abef9b4a 100644
--- a/drivers/uwb/hwa-rc.c
+++ b/drivers/uwb/hwa-rc.c
@@ -900,6 +900,12 @@ static const struct usb_device_id hwarc_id_table[] = {
900 /* Intel i1480 (using firmware 1.3PA2-20070828) */ 900 /* Intel i1480 (using firmware 1.3PA2-20070828) */
901 { USB_DEVICE_AND_INTERFACE_INFO(0x8086, 0x0c3b, 0xe0, 0x01, 0x02), 901 { USB_DEVICE_AND_INTERFACE_INFO(0x8086, 0x0c3b, 0xe0, 0x01, 0x02),
902 .driver_info = WUSB_QUIRK_WHCI_CMD_EVT }, 902 .driver_info = WUSB_QUIRK_WHCI_CMD_EVT },
903 /* Alereon 5310 */
904 { USB_DEVICE_AND_INTERFACE_INFO(0x13dc, 0x5310, 0xe0, 0x01, 0x02),
905 .driver_info = WUSB_QUIRK_WHCI_CMD_EVT },
906 /* Alereon 5611 */
907 { USB_DEVICE_AND_INTERFACE_INFO(0x13dc, 0x5611, 0xe0, 0x01, 0x02),
908 .driver_info = WUSB_QUIRK_WHCI_CMD_EVT },
903 /* Generic match for the Radio Control interface */ 909 /* Generic match for the Radio Control interface */
904 { USB_INTERFACE_INFO(0xe0, 0x01, 0x02), }, 910 { USB_INTERFACE_INFO(0xe0, 0x01, 0x02), },
905 { }, 911 { },
diff --git a/drivers/uwb/pal.c b/drivers/uwb/pal.c
index 8ee7d90a8c68..690577d2a35b 100644
--- a/drivers/uwb/pal.c
+++ b/drivers/uwb/pal.c
@@ -44,10 +44,12 @@ int uwb_pal_register(struct uwb_pal *pal)
44 int ret; 44 int ret;
45 45
46 if (pal->device) { 46 if (pal->device) {
47 /* create a link to the uwb_rc in the PAL device's directory. */
47 ret = sysfs_create_link(&pal->device->kobj, 48 ret = sysfs_create_link(&pal->device->kobj,
48 &rc->uwb_dev.dev.kobj, "uwb_rc"); 49 &rc->uwb_dev.dev.kobj, "uwb_rc");
49 if (ret < 0) 50 if (ret < 0)
50 return ret; 51 return ret;
52 /* create a link to the PAL in the UWB device's directory. */
51 ret = sysfs_create_link(&rc->uwb_dev.dev.kobj, 53 ret = sysfs_create_link(&rc->uwb_dev.dev.kobj,
52 &pal->device->kobj, pal->name); 54 &pal->device->kobj, pal->name);
53 if (ret < 0) { 55 if (ret < 0) {
diff --git a/drivers/uwb/rsv.c b/drivers/uwb/rsv.c
index f4ae05f78c42..738e8a8cb811 100644
--- a/drivers/uwb/rsv.c
+++ b/drivers/uwb/rsv.c
@@ -872,7 +872,7 @@ void uwb_rsv_queue_update(struct uwb_rc *rc)
872 */ 872 */
873void uwb_rsv_sched_update(struct uwb_rc *rc) 873void uwb_rsv_sched_update(struct uwb_rc *rc)
874{ 874{
875 spin_lock_bh(&rc->rsvs_lock); 875 spin_lock_irq(&rc->rsvs_lock);
876 if (!delayed_work_pending(&rc->rsv_update_work)) { 876 if (!delayed_work_pending(&rc->rsv_update_work)) {
877 if (rc->set_drp_ie_pending > 0) { 877 if (rc->set_drp_ie_pending > 0) {
878 rc->set_drp_ie_pending++; 878 rc->set_drp_ie_pending++;
@@ -881,7 +881,7 @@ void uwb_rsv_sched_update(struct uwb_rc *rc)
881 uwb_rsv_queue_update(rc); 881 uwb_rsv_queue_update(rc);
882 } 882 }
883unlock: 883unlock:
884 spin_unlock_bh(&rc->rsvs_lock); 884 spin_unlock_irq(&rc->rsvs_lock);
885} 885}
886 886
887/* 887/*
diff --git a/drivers/uwb/uwb-internal.h b/drivers/uwb/uwb-internal.h
index a7494bf10081..9a103b100f1e 100644
--- a/drivers/uwb/uwb-internal.h
+++ b/drivers/uwb/uwb-internal.h
@@ -55,7 +55,8 @@ static inline struct uwb_rc *__uwb_rc_get(struct uwb_rc *rc)
55 55
56static inline void __uwb_rc_put(struct uwb_rc *rc) 56static inline void __uwb_rc_put(struct uwb_rc *rc)
57{ 57{
58 uwb_dev_put(&rc->uwb_dev); 58 if (rc)
59 uwb_dev_put(&rc->uwb_dev);
59} 60}
60 61
61extern int uwb_rc_reset(struct uwb_rc *rc); 62extern int uwb_rc_reset(struct uwb_rc *rc);
diff --git a/drivers/uwb/whci.c b/drivers/uwb/whci.c
index f48093e649e4..c9df8ba97dae 100644
--- a/drivers/uwb/whci.c
+++ b/drivers/uwb/whci.c
@@ -253,19 +253,7 @@ static struct pci_driver whci_driver = {
253 .remove = whci_remove, 253 .remove = whci_remove,
254}; 254};
255 255
256static int __init whci_init(void) 256module_pci_driver(whci_driver);
257{
258 return pci_register_driver(&whci_driver);
259}
260
261static void __exit whci_exit(void)
262{
263 pci_unregister_driver(&whci_driver);
264}
265
266module_init(whci_init);
267module_exit(whci_exit);
268
269MODULE_DESCRIPTION("WHCI UWB Multi-interface Controller enumerator"); 257MODULE_DESCRIPTION("WHCI UWB Multi-interface Controller enumerator");
270MODULE_AUTHOR("Cambridge Silicon Radio Ltd."); 258MODULE_AUTHOR("Cambridge Silicon Radio Ltd.");
271MODULE_LICENSE("GPL"); 259MODULE_LICENSE("GPL");