aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uwb/hwa-rc.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2008-11-07 12:37:33 -0500
committerDavid Vrabel <david.vrabel@csr.com>2008-11-07 12:37:33 -0500
commit307ba6dd73254fe7d2ce27db64ffd90e1bb3c6c0 (patch)
tree535e10e6bd399c1f1d1f55a546e0c6aa92ba9dee /drivers/uwb/hwa-rc.c
parentfec1a5932f16c0eb1b3f5ca2e18d81d860924088 (diff)
uwb: don't unbind the radio controller driver when resetting
Use pre_reset and post_reset methods to avoid unbinding the radio controller driver after a uwb_rc_reset_all() call. This avoids a deadlock in uwb_rc_rm() when waiting for the uwb event thread to stop. Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers/uwb/hwa-rc.c')
-rw-r--r--drivers/uwb/hwa-rc.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/uwb/hwa-rc.c b/drivers/uwb/hwa-rc.c
index 18009c99577d..158e98d08af9 100644
--- a/drivers/uwb/hwa-rc.c
+++ b/drivers/uwb/hwa-rc.c
@@ -881,6 +881,24 @@ static void hwarc_disconnect(struct usb_interface *iface)
881 uwb_rc_put(uwb_rc); /* when creating the device, refcount = 1 */ 881 uwb_rc_put(uwb_rc); /* when creating the device, refcount = 1 */
882} 882}
883 883
884static int hwarc_pre_reset(struct usb_interface *iface)
885{
886 struct hwarc *hwarc = usb_get_intfdata(iface);
887 struct uwb_rc *uwb_rc = hwarc->uwb_rc;
888
889 uwb_rc_pre_reset(uwb_rc);
890 return 0;
891}
892
893static int hwarc_post_reset(struct usb_interface *iface)
894{
895 struct hwarc *hwarc = usb_get_intfdata(iface);
896 struct uwb_rc *uwb_rc = hwarc->uwb_rc;
897
898 uwb_rc_post_reset(uwb_rc);
899 return 0;
900}
901
884/** USB device ID's that we handle */ 902/** USB device ID's that we handle */
885static struct usb_device_id hwarc_id_table[] = { 903static struct usb_device_id hwarc_id_table[] = {
886 /* D-Link DUB-1210 */ 904 /* D-Link DUB-1210 */
@@ -897,9 +915,11 @@ MODULE_DEVICE_TABLE(usb, hwarc_id_table);
897 915
898static struct usb_driver hwarc_driver = { 916static struct usb_driver hwarc_driver = {
899 .name = "hwa-rc", 917 .name = "hwa-rc",
918 .id_table = hwarc_id_table,
900 .probe = hwarc_probe, 919 .probe = hwarc_probe,
901 .disconnect = hwarc_disconnect, 920 .disconnect = hwarc_disconnect,
902 .id_table = hwarc_id_table, 921 .pre_reset = hwarc_pre_reset,
922 .post_reset = hwarc_post_reset,
903}; 923};
904 924
905static int __init hwarc_driver_init(void) 925static int __init hwarc_driver_init(void)