diff options
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_usb.c')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_usb.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 3faaeb2b7c89..a15b09549245 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -366,15 +366,6 @@ error: | |||
366 | return r; | 366 | return r; |
367 | } | 367 | } |
368 | 368 | ||
369 | static void disable_read_regs_int(struct zd_usb *usb) | ||
370 | { | ||
371 | struct zd_usb_interrupt *intr = &usb->intr; | ||
372 | |||
373 | spin_lock(&intr->lock); | ||
374 | intr->read_regs_enabled = 0; | ||
375 | spin_unlock(&intr->lock); | ||
376 | } | ||
377 | |||
378 | #define urb_dev(urb) (&(urb)->dev->dev) | 369 | #define urb_dev(urb) (&(urb)->dev->dev) |
379 | 370 | ||
380 | static inline void handle_regs_int(struct urb *urb) | 371 | static inline void handle_regs_int(struct urb *urb) |
@@ -1156,10 +1147,19 @@ static void prepare_read_regs_int(struct zd_usb *usb) | |||
1156 | { | 1147 | { |
1157 | struct zd_usb_interrupt *intr = &usb->intr; | 1148 | struct zd_usb_interrupt *intr = &usb->intr; |
1158 | 1149 | ||
1159 | spin_lock(&intr->lock); | 1150 | spin_lock_irq(&intr->lock); |
1160 | intr->read_regs_enabled = 1; | 1151 | intr->read_regs_enabled = 1; |
1161 | INIT_COMPLETION(intr->read_regs.completion); | 1152 | INIT_COMPLETION(intr->read_regs.completion); |
1162 | spin_unlock(&intr->lock); | 1153 | spin_unlock_irq(&intr->lock); |
1154 | } | ||
1155 | |||
1156 | static void disable_read_regs_int(struct zd_usb *usb) | ||
1157 | { | ||
1158 | struct zd_usb_interrupt *intr = &usb->intr; | ||
1159 | |||
1160 | spin_lock_irq(&intr->lock); | ||
1161 | intr->read_regs_enabled = 0; | ||
1162 | spin_unlock_irq(&intr->lock); | ||
1163 | } | 1163 | } |
1164 | 1164 | ||
1165 | static int get_results(struct zd_usb *usb, u16 *values, | 1165 | static int get_results(struct zd_usb *usb, u16 *values, |
@@ -1171,7 +1171,7 @@ static int get_results(struct zd_usb *usb, u16 *values, | |||
1171 | struct read_regs_int *rr = &intr->read_regs; | 1171 | struct read_regs_int *rr = &intr->read_regs; |
1172 | struct usb_int_regs *regs = (struct usb_int_regs *)rr->buffer; | 1172 | struct usb_int_regs *regs = (struct usb_int_regs *)rr->buffer; |
1173 | 1173 | ||
1174 | spin_lock(&intr->lock); | 1174 | spin_lock_irq(&intr->lock); |
1175 | 1175 | ||
1176 | r = -EIO; | 1176 | r = -EIO; |
1177 | /* The created block size seems to be larger than expected. | 1177 | /* The created block size seems to be larger than expected. |
@@ -1204,7 +1204,7 @@ static int get_results(struct zd_usb *usb, u16 *values, | |||
1204 | 1204 | ||
1205 | r = 0; | 1205 | r = 0; |
1206 | error_unlock: | 1206 | error_unlock: |
1207 | spin_unlock(&intr->lock); | 1207 | spin_unlock_irq(&intr->lock); |
1208 | return r; | 1208 | return r; |
1209 | } | 1209 | } |
1210 | 1210 | ||