diff options
Diffstat (limited to 'drivers/uwb')
-rw-r--r-- | drivers/uwb/drp.c | 4 | ||||
-rw-r--r-- | drivers/uwb/est.c | 7 | ||||
-rw-r--r-- | drivers/uwb/hwa-rc.c | 6 | ||||
-rw-r--r-- | drivers/uwb/pal.c | 2 | ||||
-rw-r--r-- | drivers/uwb/rsv.c | 4 | ||||
-rw-r--r-- | drivers/uwb/uwb-internal.h | 3 | ||||
-rw-r--r-- | drivers/uwb/whci.c | 14 |
7 files changed, 18 insertions, 22 deletions
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c index 3fbcf789dfa..16ada8341c4 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, } 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); } /** diff --git a/drivers/uwb/est.c b/drivers/uwb/est.c index 86ed7e61e59..457f31d99bf 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, unsigned long flags; unsigned itr; u16 type_event_high, event; - u8 *ptr = (u8 *) rceb; read_lock_irqsave(&uwb_est_lock, flags); size = -ENOSPC; @@ -453,12 +452,12 @@ ssize_t uwb_est_find_size(struct uwb_rc *rc, const struct uwb_rceb *rceb, if (size != -ENOENT) goto out; } - dev_dbg(dev, "event 0x%02x/%04x/%02x: no handlers available; " - "RCEB %02x %02x %02x %02x\n", + dev_dbg(dev, + "event 0x%02x/%04x/%02x: no handlers available; RCEB %4ph\n", (unsigned) rceb->bEventType, (unsigned) le16_to_cpu(rceb->wEvent), (unsigned) rceb->bEventContext, - ptr[0], ptr[1], ptr[2], ptr[3]); + rceb); size = -ENOENT; out: read_unlock_irqrestore(&uwb_est_lock, flags); diff --git a/drivers/uwb/hwa-rc.c b/drivers/uwb/hwa-rc.c index 810c90ae2c5..0621abef9b4 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[] = { /* Intel i1480 (using firmware 1.3PA2-20070828) */ { USB_DEVICE_AND_INTERFACE_INFO(0x8086, 0x0c3b, 0xe0, 0x01, 0x02), .driver_info = WUSB_QUIRK_WHCI_CMD_EVT }, + /* Alereon 5310 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x13dc, 0x5310, 0xe0, 0x01, 0x02), + .driver_info = WUSB_QUIRK_WHCI_CMD_EVT }, + /* Alereon 5611 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x13dc, 0x5611, 0xe0, 0x01, 0x02), + .driver_info = WUSB_QUIRK_WHCI_CMD_EVT }, /* Generic match for the Radio Control interface */ { USB_INTERFACE_INFO(0xe0, 0x01, 0x02), }, { }, diff --git a/drivers/uwb/pal.c b/drivers/uwb/pal.c index 8ee7d90a8c6..690577d2a35 100644 --- a/drivers/uwb/pal.c +++ b/drivers/uwb/pal.c @@ -44,10 +44,12 @@ int uwb_pal_register(struct uwb_pal *pal) int ret; if (pal->device) { + /* create a link to the uwb_rc in the PAL device's directory. */ ret = sysfs_create_link(&pal->device->kobj, &rc->uwb_dev.dev.kobj, "uwb_rc"); if (ret < 0) return ret; + /* create a link to the PAL in the UWB device's directory. */ ret = sysfs_create_link(&rc->uwb_dev.dev.kobj, &pal->device->kobj, pal->name); if (ret < 0) { diff --git a/drivers/uwb/rsv.c b/drivers/uwb/rsv.c index f4ae05f78c4..738e8a8cb81 100644 --- a/drivers/uwb/rsv.c +++ b/drivers/uwb/rsv.c @@ -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++; @@ -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); } /* diff --git a/drivers/uwb/uwb-internal.h b/drivers/uwb/uwb-internal.h index a7494bf1008..9a103b100f1 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) static inline void __uwb_rc_put(struct uwb_rc *rc) { - uwb_dev_put(&rc->uwb_dev); + if (rc) + uwb_dev_put(&rc->uwb_dev); } extern int uwb_rc_reset(struct uwb_rc *rc); diff --git a/drivers/uwb/whci.c b/drivers/uwb/whci.c index f48093e649e..c9df8ba97da 100644 --- a/drivers/uwb/whci.c +++ b/drivers/uwb/whci.c @@ -253,19 +253,7 @@ static struct pci_driver whci_driver = { .remove = whci_remove, }; -static int __init whci_init(void) -{ - return pci_register_driver(&whci_driver); -} - -static void __exit whci_exit(void) -{ - pci_unregister_driver(&whci_driver); -} - -module_init(whci_init); -module_exit(whci_exit); - +module_pci_driver(whci_driver); MODULE_DESCRIPTION("WHCI UWB Multi-interface Controller enumerator"); MODULE_AUTHOR("Cambridge Silicon Radio Ltd."); MODULE_LICENSE("GPL"); |