diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-30 18:45:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-30 18:45:59 -0400 |
commit | 980019d74e4b2428362b36a0506519d6d9460800 (patch) | |
tree | a71cc0452db76f6c5fdee2611d0d7d39f22f8e69 | |
parent | 9f2952dbcbc0a143cff19f2e44fc504901aad86f (diff) | |
parent | e10ac155828324c475637827d4c3525012391f02 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
Staging: rtl8192u_usb: Add LG device ID 043e:7a01
Staging: rtl8192s_usb: Remove duplicate device ID
Staging: rt2870: add device id for Zyxel NWD-270N
Staging: comedi: fix read past end of array in cb_pcidda_attach()
Staging: rtl8192su: add device ids
Staging: rtl8192su: remove device ids
Staging: rtl8187se: Fix compile warnings in 2.6.35-rc2
Staging: wlags49_h2: Fix build error when CONFIG_SYSFS is not set
Staging: wlags49_h2: add missing <linux/string.h> for strlen
Staging: hv: fix hv_utils module to properly autoload
staging: hv: Fix race condition on vmbus channel initialization
Staging: comedi: drivers: adl_pci9111: Fix AI commands in TRIG_FOLLOW case
Staging: mrst-touchscreen: fix dereferencing free memory
Staging: batman-adv: fix function prototype
Staging: batman-adv: return -EFAULT on copy_to_user errors
staging: usbip: usbip_common: kill rx thread on tx thread creation error.
-rw-r--r-- | drivers/staging/batman-adv/bat_sysfs.c | 24 | ||||
-rw-r--r-- | drivers/staging/batman-adv/device.c | 2 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/adl_pci9111.c | 9 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/cb_pcidda.c | 3 | ||||
-rw-r--r-- | drivers/staging/hv/channel_mgmt.c | 41 | ||||
-rw-r--r-- | drivers/staging/hv/hv_utils.c | 28 | ||||
-rw-r--r-- | drivers/staging/hv/vmbus.h | 2 | ||||
-rw-r--r-- | drivers/staging/hv/vmbus_drv.c | 3 | ||||
-rw-r--r-- | drivers/staging/mrst-touchscreen/intel-mid-touch.c | 2 | ||||
-rw-r--r-- | drivers/staging/rt2860/usb_main_dev.c | 1 | ||||
-rw-r--r-- | drivers/staging/rtl8187se/r8180_core.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192su/r8192U_core.c | 43 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 2 | ||||
-rw-r--r-- | drivers/staging/usbip/usbip_common.c | 46 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/wl_enc.c | 1 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/wl_sysfs.h | 4 |
16 files changed, 145 insertions, 68 deletions
diff --git a/drivers/staging/batman-adv/bat_sysfs.c b/drivers/staging/batman-adv/bat_sysfs.c index e2c000b80ca0..212bc21e6d68 100644 --- a/drivers/staging/batman-adv/bat_sysfs.c +++ b/drivers/staging/batman-adv/bat_sysfs.c | |||
@@ -225,9 +225,9 @@ static struct bat_attribute *mesh_attrs[] = { | |||
225 | NULL, | 225 | NULL, |
226 | }; | 226 | }; |
227 | 227 | ||
228 | static ssize_t transtable_local_read(struct kobject *kobj, | 228 | static ssize_t transtable_local_read(struct file *filp, struct kobject *kobj, |
229 | struct bin_attribute *bin_attr, | 229 | struct bin_attribute *bin_attr, |
230 | char *buff, loff_t off, size_t count) | 230 | char *buff, loff_t off, size_t count) |
231 | { | 231 | { |
232 | struct device *dev = to_dev(kobj->parent); | 232 | struct device *dev = to_dev(kobj->parent); |
233 | struct net_device *net_dev = to_net_dev(dev); | 233 | struct net_device *net_dev = to_net_dev(dev); |
@@ -235,9 +235,9 @@ static ssize_t transtable_local_read(struct kobject *kobj, | |||
235 | return hna_local_fill_buffer_text(net_dev, buff, count, off); | 235 | return hna_local_fill_buffer_text(net_dev, buff, count, off); |
236 | } | 236 | } |
237 | 237 | ||
238 | static ssize_t transtable_global_read(struct kobject *kobj, | 238 | static ssize_t transtable_global_read(struct file *filp, struct kobject *kobj, |
239 | struct bin_attribute *bin_attr, | 239 | struct bin_attribute *bin_attr, |
240 | char *buff, loff_t off, size_t count) | 240 | char *buff, loff_t off, size_t count) |
241 | { | 241 | { |
242 | struct device *dev = to_dev(kobj->parent); | 242 | struct device *dev = to_dev(kobj->parent); |
243 | struct net_device *net_dev = to_net_dev(dev); | 243 | struct net_device *net_dev = to_net_dev(dev); |
@@ -245,9 +245,9 @@ static ssize_t transtable_global_read(struct kobject *kobj, | |||
245 | return hna_global_fill_buffer_text(net_dev, buff, count, off); | 245 | return hna_global_fill_buffer_text(net_dev, buff, count, off); |
246 | } | 246 | } |
247 | 247 | ||
248 | static ssize_t originators_read(struct kobject *kobj, | 248 | static ssize_t originators_read(struct file *filp, struct kobject *kobj, |
249 | struct bin_attribute *bin_attr, | 249 | struct bin_attribute *bin_attr, |
250 | char *buff, loff_t off, size_t count) | 250 | char *buff, loff_t off, size_t count) |
251 | { | 251 | { |
252 | struct device *dev = to_dev(kobj->parent); | 252 | struct device *dev = to_dev(kobj->parent); |
253 | struct net_device *net_dev = to_net_dev(dev); | 253 | struct net_device *net_dev = to_net_dev(dev); |
@@ -255,9 +255,9 @@ static ssize_t originators_read(struct kobject *kobj, | |||
255 | return orig_fill_buffer_text(net_dev, buff, count, off); | 255 | return orig_fill_buffer_text(net_dev, buff, count, off); |
256 | } | 256 | } |
257 | 257 | ||
258 | static ssize_t vis_data_read(struct kobject *kobj, | 258 | static ssize_t vis_data_read(struct file *filp, struct kobject *kobj, |
259 | struct bin_attribute *bin_attr, | 259 | struct bin_attribute *bin_attr, |
260 | char *buff, loff_t off, size_t count) | 260 | char *buff, loff_t off, size_t count) |
261 | { | 261 | { |
262 | struct device *dev = to_dev(kobj->parent); | 262 | struct device *dev = to_dev(kobj->parent); |
263 | struct net_device *net_dev = to_net_dev(dev); | 263 | struct net_device *net_dev = to_net_dev(dev); |
diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index 7eb6559e0315..32204b5572d0 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c | |||
@@ -196,7 +196,7 @@ ssize_t bat_device_read(struct file *file, char __user *buf, size_t count, | |||
196 | kfree(device_packet); | 196 | kfree(device_packet); |
197 | 197 | ||
198 | if (error) | 198 | if (error) |
199 | return error; | 199 | return -EFAULT; |
200 | 200 | ||
201 | return sizeof(struct icmp_packet); | 201 | return sizeof(struct icmp_packet); |
202 | } | 202 | } |
diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index 36a254cd4413..39d112b708e3 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c | |||
@@ -824,9 +824,12 @@ static int pci9111_ai_do_cmd(struct comedi_device *dev, | |||
824 | plx9050_interrupt_control(dev_private->lcr_io_base, true, true, | 824 | plx9050_interrupt_control(dev_private->lcr_io_base, true, true, |
825 | false, true, true); | 825 | false, true, true); |
826 | 826 | ||
827 | dev_private->scan_delay = | 827 | if (async_cmd->scan_begin_src == TRIG_TIMER) { |
828 | (async_cmd->scan_begin_arg / (async_cmd->convert_arg * | 828 | dev_private->scan_delay = |
829 | async_cmd->chanlist_len)) - 1; | 829 | (async_cmd->scan_begin_arg / |
830 | (async_cmd->convert_arg * | ||
831 | async_cmd->chanlist_len)) - 1; | ||
832 | } | ||
830 | 833 | ||
831 | break; | 834 | break; |
832 | 835 | ||
diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c index 81829d6fd287..c374bee25068 100644 --- a/drivers/staging/comedi/drivers/cb_pcidda.c +++ b/drivers/staging/comedi/drivers/cb_pcidda.c | |||
@@ -52,7 +52,6 @@ Please report success/failure with other different cards to | |||
52 | #include "8255.h" | 52 | #include "8255.h" |
53 | 53 | ||
54 | #define PCI_VENDOR_ID_CB 0x1307 /* PCI vendor number of ComputerBoards */ | 54 | #define PCI_VENDOR_ID_CB 0x1307 /* PCI vendor number of ComputerBoards */ |
55 | #define N_BOARDS 10 /* Number of boards in cb_pcidda_boards */ | ||
56 | #define EEPROM_SIZE 128 /* number of entries in eeprom */ | 55 | #define EEPROM_SIZE 128 /* number of entries in eeprom */ |
57 | #define MAX_AO_CHANNELS 8 /* maximum number of ao channels for supported boards */ | 56 | #define MAX_AO_CHANNELS 8 /* maximum number of ao channels for supported boards */ |
58 | 57 | ||
@@ -307,7 +306,7 @@ static int cb_pcidda_attach(struct comedi_device *dev, | |||
307 | continue; | 306 | continue; |
308 | } | 307 | } |
309 | } | 308 | } |
310 | for (index = 0; index < N_BOARDS; index++) { | 309 | for (index = 0; index < ARRAY_SIZE(cb_pcidda_boards); index++) { |
311 | if (cb_pcidda_boards[index].device_id == | 310 | if (cb_pcidda_boards[index].device_id == |
312 | pcidev->device) { | 311 | pcidev->device) { |
313 | goto found; | 312 | goto found; |
diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c index 3f53b4d1e4cf..12db555a3a5d 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/staging/hv/channel_mgmt.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/completion.h> | ||
26 | #include "osd.h" | 27 | #include "osd.h" |
27 | #include "logging.h" | 28 | #include "logging.h" |
28 | #include "vmbus_private.h" | 29 | #include "vmbus_private.h" |
@@ -293,6 +294,25 @@ void FreeVmbusChannel(struct vmbus_channel *Channel) | |||
293 | Channel); | 294 | Channel); |
294 | } | 295 | } |
295 | 296 | ||
297 | |||
298 | DECLARE_COMPLETION(hv_channel_ready); | ||
299 | |||
300 | /* | ||
301 | * Count initialized channels, and ensure all channels are ready when hv_vmbus | ||
302 | * module loading completes. | ||
303 | */ | ||
304 | static void count_hv_channel(void) | ||
305 | { | ||
306 | static int counter; | ||
307 | unsigned long flags; | ||
308 | |||
309 | spin_lock_irqsave(&gVmbusConnection.channel_lock, flags); | ||
310 | if (++counter == MAX_MSG_TYPES) | ||
311 | complete(&hv_channel_ready); | ||
312 | spin_unlock_irqrestore(&gVmbusConnection.channel_lock, flags); | ||
313 | } | ||
314 | |||
315 | |||
296 | /* | 316 | /* |
297 | * VmbusChannelProcessOffer - Process the offer by creating a channel/device | 317 | * VmbusChannelProcessOffer - Process the offer by creating a channel/device |
298 | * associated with this offer | 318 | * associated with this offer |
@@ -373,22 +393,21 @@ static void VmbusChannelProcessOffer(void *context) | |||
373 | * can cleanup properly | 393 | * can cleanup properly |
374 | */ | 394 | */ |
375 | newChannel->State = CHANNEL_OPEN_STATE; | 395 | newChannel->State = CHANNEL_OPEN_STATE; |
376 | cnt = 0; | ||
377 | 396 | ||
378 | while (cnt != MAX_MSG_TYPES) { | 397 | /* Open IC channels */ |
398 | for (cnt = 0; cnt < MAX_MSG_TYPES; cnt++) { | ||
379 | if (memcmp(&newChannel->OfferMsg.Offer.InterfaceType, | 399 | if (memcmp(&newChannel->OfferMsg.Offer.InterfaceType, |
380 | &hv_cb_utils[cnt].data, | 400 | &hv_cb_utils[cnt].data, |
381 | sizeof(struct hv_guid)) == 0) { | 401 | sizeof(struct hv_guid)) == 0 && |
402 | VmbusChannelOpen(newChannel, 2 * PAGE_SIZE, | ||
403 | 2 * PAGE_SIZE, NULL, 0, | ||
404 | hv_cb_utils[cnt].callback, | ||
405 | newChannel) == 0) { | ||
406 | hv_cb_utils[cnt].channel = newChannel; | ||
382 | DPRINT_INFO(VMBUS, "%s", | 407 | DPRINT_INFO(VMBUS, "%s", |
383 | hv_cb_utils[cnt].log_msg); | 408 | hv_cb_utils[cnt].log_msg); |
384 | 409 | count_hv_channel(); | |
385 | if (VmbusChannelOpen(newChannel, 2 * PAGE_SIZE, | ||
386 | 2 * PAGE_SIZE, NULL, 0, | ||
387 | hv_cb_utils[cnt].callback, | ||
388 | newChannel) == 0) | ||
389 | hv_cb_utils[cnt].channel = newChannel; | ||
390 | } | 410 | } |
391 | cnt++; | ||
392 | } | 411 | } |
393 | } | 412 | } |
394 | DPRINT_EXIT(VMBUS); | 413 | DPRINT_EXIT(VMBUS); |
diff --git a/drivers/staging/hv/hv_utils.c b/drivers/staging/hv/hv_utils.c index 8a49aafea37a..2adc9b48ca9c 100644 --- a/drivers/staging/hv/hv_utils.c +++ b/drivers/staging/hv/hv_utils.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/sysctl.h> | 25 | #include <linux/sysctl.h> |
26 | #include <linux/reboot.h> | 26 | #include <linux/reboot.h> |
27 | #include <linux/dmi.h> | ||
28 | #include <linux/pci.h> | ||
27 | 29 | ||
28 | #include "logging.h" | 30 | #include "logging.h" |
29 | #include "osd.h" | 31 | #include "osd.h" |
@@ -251,10 +253,36 @@ static void heartbeat_onchannelcallback(void *context) | |||
251 | DPRINT_EXIT(VMBUS); | 253 | DPRINT_EXIT(VMBUS); |
252 | } | 254 | } |
253 | 255 | ||
256 | static const struct pci_device_id __initconst | ||
257 | hv_utils_pci_table[] __maybe_unused = { | ||
258 | { PCI_DEVICE(0x1414, 0x5353) }, /* Hyper-V emulated VGA controller */ | ||
259 | { 0 } | ||
260 | }; | ||
261 | MODULE_DEVICE_TABLE(pci, hv_utils_pci_table); | ||
262 | |||
263 | |||
264 | static const struct dmi_system_id __initconst | ||
265 | hv_utils_dmi_table[] __maybe_unused = { | ||
266 | { | ||
267 | .ident = "Hyper-V", | ||
268 | .matches = { | ||
269 | DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), | ||
270 | DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"), | ||
271 | DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"), | ||
272 | }, | ||
273 | }, | ||
274 | { }, | ||
275 | }; | ||
276 | MODULE_DEVICE_TABLE(dmi, hv_utils_dmi_table); | ||
277 | |||
278 | |||
254 | static int __init init_hyperv_utils(void) | 279 | static int __init init_hyperv_utils(void) |
255 | { | 280 | { |
256 | printk(KERN_INFO "Registering HyperV Utility Driver\n"); | 281 | printk(KERN_INFO "Registering HyperV Utility Driver\n"); |
257 | 282 | ||
283 | if (!dmi_check_system(hv_utils_dmi_table)) | ||
284 | return -ENODEV; | ||
285 | |||
258 | hv_cb_utils[HV_SHUTDOWN_MSG].channel->OnChannelCallback = | 286 | hv_cb_utils[HV_SHUTDOWN_MSG].channel->OnChannelCallback = |
259 | &shutdown_onchannelcallback; | 287 | &shutdown_onchannelcallback; |
260 | hv_cb_utils[HV_SHUTDOWN_MSG].callback = &shutdown_onchannelcallback; | 288 | hv_cb_utils[HV_SHUTDOWN_MSG].callback = &shutdown_onchannelcallback; |
diff --git a/drivers/staging/hv/vmbus.h b/drivers/staging/hv/vmbus.h index 0c6ee0f487f3..3c14b2926e00 100644 --- a/drivers/staging/hv/vmbus.h +++ b/drivers/staging/hv/vmbus.h | |||
@@ -74,4 +74,6 @@ int vmbus_child_driver_register(struct driver_context *driver_ctx); | |||
74 | void vmbus_child_driver_unregister(struct driver_context *driver_ctx); | 74 | void vmbus_child_driver_unregister(struct driver_context *driver_ctx); |
75 | void vmbus_get_interface(struct vmbus_channel_interface *interface); | 75 | void vmbus_get_interface(struct vmbus_channel_interface *interface); |
76 | 76 | ||
77 | extern struct completion hv_channel_ready; | ||
78 | |||
77 | #endif /* _VMBUS_H_ */ | 79 | #endif /* _VMBUS_H_ */ |
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index c21731a12ca7..22c80ece6388 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/dmi.h> | 28 | #include <linux/dmi.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/completion.h> | ||
30 | #include "version_info.h" | 31 | #include "version_info.h" |
31 | #include "osd.h" | 32 | #include "osd.h" |
32 | #include "logging.h" | 33 | #include "logging.h" |
@@ -356,6 +357,8 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv)) | |||
356 | 357 | ||
357 | vmbus_drv_obj->GetChannelOffers(); | 358 | vmbus_drv_obj->GetChannelOffers(); |
358 | 359 | ||
360 | wait_for_completion(&hv_channel_ready); | ||
361 | |||
359 | cleanup: | 362 | cleanup: |
360 | DPRINT_EXIT(VMBUS_DRV); | 363 | DPRINT_EXIT(VMBUS_DRV); |
361 | 364 | ||
diff --git a/drivers/staging/mrst-touchscreen/intel-mid-touch.c b/drivers/staging/mrst-touchscreen/intel-mid-touch.c index 1db00975a594..abba22f921be 100644 --- a/drivers/staging/mrst-touchscreen/intel-mid-touch.c +++ b/drivers/staging/mrst-touchscreen/intel-mid-touch.c | |||
@@ -817,9 +817,9 @@ static int mrstouch_remove(struct spi_device *spi) | |||
817 | free_irq(mrstouchdevp->irq, mrstouchdevp); | 817 | free_irq(mrstouchdevp->irq, mrstouchdevp); |
818 | input_unregister_device(mrstouchdevp->input); | 818 | input_unregister_device(mrstouchdevp->input); |
819 | input_free_device(mrstouchdevp->input); | 819 | input_free_device(mrstouchdevp->input); |
820 | kfree(mrstouchdevp); | ||
821 | if (mrstouchdevp->pendet_thrd) | 820 | if (mrstouchdevp->pendet_thrd) |
822 | kthread_stop(mrstouchdevp->pendet_thrd); | 821 | kthread_stop(mrstouchdevp->pendet_thrd); |
822 | kfree(mrstouchdevp); | ||
823 | return 0; | 823 | return 0; |
824 | } | 824 | } |
825 | 825 | ||
diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c index b740662d095a..674769d2b59b 100644 --- a/drivers/staging/rt2860/usb_main_dev.c +++ b/drivers/staging/rt2860/usb_main_dev.c | |||
@@ -77,6 +77,7 @@ struct usb_device_id rtusb_usb_id[] = { | |||
77 | {USB_DEVICE(0x083A, 0x7522)}, /* Arcadyan */ | 77 | {USB_DEVICE(0x083A, 0x7522)}, /* Arcadyan */ |
78 | {USB_DEVICE(0x0CDE, 0x0022)}, /* ZCOM */ | 78 | {USB_DEVICE(0x0CDE, 0x0022)}, /* ZCOM */ |
79 | {USB_DEVICE(0x0586, 0x3416)}, /* Zyxel */ | 79 | {USB_DEVICE(0x0586, 0x3416)}, /* Zyxel */ |
80 | {USB_DEVICE(0x0586, 0x341a)}, /* Zyxel NWD-270N */ | ||
80 | {USB_DEVICE(0x0CDE, 0x0025)}, /* Zyxel */ | 81 | {USB_DEVICE(0x0CDE, 0x0025)}, /* Zyxel */ |
81 | {USB_DEVICE(0x1740, 0x9701)}, /* EnGenius */ | 82 | {USB_DEVICE(0x1740, 0x9701)}, /* EnGenius */ |
82 | {USB_DEVICE(0x1740, 0x9702)}, /* EnGenius */ | 83 | {USB_DEVICE(0x1740, 0x9702)}, /* EnGenius */ |
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index dacefea78113..49ab9fa9ffa7 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c | |||
@@ -66,8 +66,6 @@ static int hwseqnum = 0; | |||
66 | static int hwwep = 0; | 66 | static int hwwep = 0; |
67 | static int channels = 0x3fff; | 67 | static int channels = 0x3fff; |
68 | 68 | ||
69 | #define eqMacAddr(a, b) (((a)[0] == (b)[0] && (a)[1] == (b)[1] && (a)[2] == (b)[2] && (a)[3] == (b)[3] && (a)[4] == (b)[4] && (a)[5] == (b)[5]) ? 1 : 0) | ||
70 | #define cpMacAddr(des, src) ((des)[0] = (src)[0], (des)[1] = (src)[1], (des)[2] = (src)[2], (des)[3] = (src)[3], (des)[4] = (src)[4], (des)[5] = (src)[5]) | ||
71 | MODULE_LICENSE("GPL"); | 69 | MODULE_LICENSE("GPL"); |
72 | MODULE_DEVICE_TABLE(pci, rtl8180_pci_id_tbl); | 70 | MODULE_DEVICE_TABLE(pci, rtl8180_pci_id_tbl); |
73 | MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>"); | 71 | MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>"); |
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index 447d6474a70c..1b6890611fb6 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c | |||
@@ -112,28 +112,29 @@ u32 rt_global_debug_component = \ | |||
112 | #define CAM_CONTENT_COUNT 8 | 112 | #define CAM_CONTENT_COUNT 8 |
113 | 113 | ||
114 | static const struct usb_device_id rtl8192_usb_id_tbl[] = { | 114 | static const struct usb_device_id rtl8192_usb_id_tbl[] = { |
115 | /* Realtek */ | 115 | {USB_DEVICE(0x0bda, 0x8171)}, /* Realtek */ |
116 | {USB_DEVICE(0x0bda, 0x8171)}, | ||
117 | {USB_DEVICE(0x0bda, 0x8192)}, | ||
118 | {USB_DEVICE(0x0bda, 0x8709)}, | ||
119 | /* Corega */ | ||
120 | {USB_DEVICE(0x07aa, 0x0043)}, | ||
121 | /* Belkin */ | ||
122 | {USB_DEVICE(0x050d, 0x805E)}, | ||
123 | {USB_DEVICE(0x050d, 0x815F)}, /* Belkin F5D8053 v6 */ | ||
124 | /* Sitecom */ | ||
125 | {USB_DEVICE(0x0df6, 0x0031)}, | ||
126 | {USB_DEVICE(0x0df6, 0x004b)}, /* WL-349 */ | ||
127 | /* EnGenius */ | ||
128 | {USB_DEVICE(0x1740, 0x9201)}, | ||
129 | /* Dlink */ | ||
130 | {USB_DEVICE(0x2001, 0x3301)}, | ||
131 | /* Zinwell */ | ||
132 | {USB_DEVICE(0x5a57, 0x0290)}, | ||
133 | /* Guillemot */ | ||
134 | {USB_DEVICE(0x06f8, 0xe031)}, | ||
135 | //92SU | ||
136 | {USB_DEVICE(0x0bda, 0x8172)}, | 116 | {USB_DEVICE(0x0bda, 0x8172)}, |
117 | {USB_DEVICE(0x0bda, 0x8173)}, | ||
118 | {USB_DEVICE(0x0bda, 0x8174)}, | ||
119 | {USB_DEVICE(0x0bda, 0x8712)}, | ||
120 | {USB_DEVICE(0x0bda, 0x8713)}, | ||
121 | {USB_DEVICE(0x07aa, 0x0047)}, | ||
122 | {USB_DEVICE(0x07d1, 0x3303)}, | ||
123 | {USB_DEVICE(0x07d1, 0x3302)}, | ||
124 | {USB_DEVICE(0x07d1, 0x3300)}, | ||
125 | {USB_DEVICE(0x1740, 0x9603)}, | ||
126 | {USB_DEVICE(0x1740, 0x9605)}, | ||
127 | {USB_DEVICE(0x050d, 0x815F)}, | ||
128 | {USB_DEVICE(0x06f8, 0xe031)}, | ||
129 | {USB_DEVICE(0x7392, 0x7611)}, | ||
130 | {USB_DEVICE(0x7392, 0x7612)}, | ||
131 | {USB_DEVICE(0x7392, 0x7622)}, | ||
132 | {USB_DEVICE(0x0DF6, 0x0045)}, | ||
133 | {USB_DEVICE(0x0E66, 0x0015)}, | ||
134 | {USB_DEVICE(0x0E66, 0x0016)}, | ||
135 | {USB_DEVICE(0x0b05, 0x1786)}, | ||
136 | /* these are not in the official list */ | ||
137 | {USB_DEVICE(0x0df6, 0x004b)}, /* WL-349 */ | ||
137 | {} | 138 | {} |
138 | }; | 139 | }; |
139 | 140 | ||
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 2bede271a2f0..f38472c2e75c 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c | |||
@@ -121,6 +121,8 @@ static const struct usb_device_id rtl8192_usb_id_tbl[] = { | |||
121 | {USB_DEVICE(0x2001, 0x3301)}, | 121 | {USB_DEVICE(0x2001, 0x3301)}, |
122 | /* Zinwell */ | 122 | /* Zinwell */ |
123 | {USB_DEVICE(0x5a57, 0x0290)}, | 123 | {USB_DEVICE(0x5a57, 0x0290)}, |
124 | /* LG */ | ||
125 | {USB_DEVICE(0x043e, 0x7a01)}, | ||
124 | {} | 126 | {} |
125 | }; | 127 | }; |
126 | 128 | ||
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 52408164036f..6a499f0eb594 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c | |||
@@ -378,47 +378,67 @@ int usbip_thread(void *param) | |||
378 | complete_and_exit(&ut->thread_done, 0); | 378 | complete_and_exit(&ut->thread_done, 0); |
379 | } | 379 | } |
380 | 380 | ||
381 | static void stop_rx_thread(struct usbip_device *ud) | ||
382 | { | ||
383 | if (ud->tcp_rx.thread != NULL) { | ||
384 | send_sig(SIGKILL, ud->tcp_rx.thread, 1); | ||
385 | wait_for_completion(&ud->tcp_rx.thread_done); | ||
386 | usbip_udbg("rx_thread for ud %p has finished\n", ud); | ||
387 | } | ||
388 | } | ||
389 | |||
390 | static void stop_tx_thread(struct usbip_device *ud) | ||
391 | { | ||
392 | if (ud->tcp_tx.thread != NULL) { | ||
393 | send_sig(SIGKILL, ud->tcp_tx.thread, 1); | ||
394 | wait_for_completion(&ud->tcp_tx.thread_done); | ||
395 | usbip_udbg("tx_thread for ud %p has finished\n", ud); | ||
396 | } | ||
397 | } | ||
398 | |||
381 | int usbip_start_threads(struct usbip_device *ud) | 399 | int usbip_start_threads(struct usbip_device *ud) |
382 | { | 400 | { |
383 | /* | 401 | /* |
384 | * threads are invoked per one device (per one connection). | 402 | * threads are invoked per one device (per one connection). |
385 | */ | 403 | */ |
386 | struct task_struct *th; | 404 | struct task_struct *th; |
405 | int err = 0; | ||
387 | 406 | ||
388 | th = kthread_run(usbip_thread, (void *)&ud->tcp_rx, "usbip"); | 407 | th = kthread_run(usbip_thread, (void *)&ud->tcp_rx, "usbip"); |
389 | if (IS_ERR(th)) { | 408 | if (IS_ERR(th)) { |
390 | printk(KERN_WARNING | 409 | printk(KERN_WARNING |
391 | "Unable to start control thread\n"); | 410 | "Unable to start control thread\n"); |
392 | return PTR_ERR(th); | 411 | err = PTR_ERR(th); |
412 | goto ust_exit; | ||
393 | } | 413 | } |
414 | |||
394 | th = kthread_run(usbip_thread, (void *)&ud->tcp_tx, "usbip"); | 415 | th = kthread_run(usbip_thread, (void *)&ud->tcp_tx, "usbip"); |
395 | if (IS_ERR(th)) { | 416 | if (IS_ERR(th)) { |
396 | printk(KERN_WARNING | 417 | printk(KERN_WARNING |
397 | "Unable to start control thread\n"); | 418 | "Unable to start control thread\n"); |
398 | return PTR_ERR(th); | 419 | err = PTR_ERR(th); |
420 | goto tx_thread_err; | ||
399 | } | 421 | } |
400 | 422 | ||
401 | /* confirm threads are starting */ | 423 | /* confirm threads are starting */ |
402 | wait_for_completion(&ud->tcp_rx.thread_done); | 424 | wait_for_completion(&ud->tcp_rx.thread_done); |
403 | wait_for_completion(&ud->tcp_tx.thread_done); | 425 | wait_for_completion(&ud->tcp_tx.thread_done); |
426 | |||
404 | return 0; | 427 | return 0; |
428 | |||
429 | tx_thread_err: | ||
430 | stop_rx_thread(ud); | ||
431 | |||
432 | ust_exit: | ||
433 | return err; | ||
405 | } | 434 | } |
406 | EXPORT_SYMBOL_GPL(usbip_start_threads); | 435 | EXPORT_SYMBOL_GPL(usbip_start_threads); |
407 | 436 | ||
408 | void usbip_stop_threads(struct usbip_device *ud) | 437 | void usbip_stop_threads(struct usbip_device *ud) |
409 | { | 438 | { |
410 | /* kill threads related to this sdev, if v.c. exists */ | 439 | /* kill threads related to this sdev, if v.c. exists */ |
411 | if (ud->tcp_rx.thread != NULL) { | 440 | stop_rx_thread(ud); |
412 | send_sig(SIGKILL, ud->tcp_rx.thread, 1); | 441 | stop_tx_thread(ud); |
413 | wait_for_completion(&ud->tcp_rx.thread_done); | ||
414 | usbip_udbg("rx_thread for ud %p has finished\n", ud); | ||
415 | } | ||
416 | |||
417 | if (ud->tcp_tx.thread != NULL) { | ||
418 | send_sig(SIGKILL, ud->tcp_tx.thread, 1); | ||
419 | wait_for_completion(&ud->tcp_tx.thread_done); | ||
420 | usbip_udbg("tx_thread for ud %p has finished\n", ud); | ||
421 | } | ||
422 | } | 442 | } |
423 | EXPORT_SYMBOL_GPL(usbip_stop_threads); | 443 | EXPORT_SYMBOL_GPL(usbip_stop_threads); |
424 | 444 | ||
diff --git a/drivers/staging/wlags49_h2/wl_enc.c b/drivers/staging/wlags49_h2/wl_enc.c index 48c44c8fdb28..26cf5486edd6 100644 --- a/drivers/staging/wlags49_h2/wl_enc.c +++ b/drivers/staging/wlags49_h2/wl_enc.c | |||
@@ -62,6 +62,7 @@ | |||
62 | /******************************************************************************* | 62 | /******************************************************************************* |
63 | * include files | 63 | * include files |
64 | ******************************************************************************/ | 64 | ******************************************************************************/ |
65 | #include <linux/string.h> | ||
65 | #include <wl_version.h> | 66 | #include <wl_version.h> |
66 | 67 | ||
67 | #include <debug.h> | 68 | #include <debug.h> |
diff --git a/drivers/staging/wlags49_h2/wl_sysfs.h b/drivers/staging/wlags49_h2/wl_sysfs.h index 6d96d03cf490..fa658c38001e 100644 --- a/drivers/staging/wlags49_h2/wl_sysfs.h +++ b/drivers/staging/wlags49_h2/wl_sysfs.h | |||
@@ -2,6 +2,6 @@ | |||
2 | extern void register_wlags_sysfs(struct net_device *); | 2 | extern void register_wlags_sysfs(struct net_device *); |
3 | extern void unregister_wlags_sysfs(struct net_device *); | 3 | extern void unregister_wlags_sysfs(struct net_device *); |
4 | #else | 4 | #else |
5 | static void register_wlags_sysfs(struct net_device *) { return; }; | 5 | static inline void register_wlags_sysfs(struct net_device *net) { } |
6 | static void unregister_wlags_sysfs(struct net_device *) { return; }; | 6 | static inline void unregister_wlags_sysfs(struct net_device *net) { } |
7 | #endif | 7 | #endif |