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: vme: Re-introduce necessary brackets
Staging: iio: fix up the iio_get_new_idr_val comment
Staging: add Add Sitecom WL-349 to rtl8192su
Staging: rt2860: add Belkin F5D8055 Wireless-N USB Dongle device id
staging: rtl8192su: add Support for Belkin F5D8053 v6
Staging: dt3155: fix 50Hz configuration
staging: usbip: Fix deadlock
Staging: rtl8192su: add USB ID for 0bda:8171
Staging: hv: name network device ethX rather than sethX
Staging: hv: Fix up memory leak on HvCleanup
Staging: hv: Fix a bug affecting IPv6
staging: iio: ring_sw: Fix incorrect test on successful read of last value, causes infinite loop
staging: iio: Function iio_get_new_idr_val() return negative value if fails.
Staging: iio: adc: fix dangling pointers
Staging: iio: light: fix dangling pointers
Staging: iio: test for failed allocation
staging: iio: lis3l02dq - incorrect ws used in container of call.

+25 -9
+2 -2
drivers/staging/dt3155/dt3155_drv.c
··· 464 /* 50/60 Hz should be set before this point but let's make sure it is */ 465 /* right anyway */ 466 467 - ReadI2C(dt3155_lbase[ minor ], CONFIG, &i2c_csr2.reg); 468 i2c_csr2.fld.HZ50 = FORMAT50HZ; 469 - WriteI2C(dt3155_lbase[ minor ], CONFIG, i2c_config.reg); 470 471 /* enable busmaster chip, clear flags */ 472
··· 464 /* 50/60 Hz should be set before this point but let's make sure it is */ 465 /* right anyway */ 466 467 + ReadI2C(dt3155_lbase[ minor ], CSR2, &i2c_csr2.reg); 468 i2c_csr2.fld.HZ50 = FORMAT50HZ; 469 + WriteI2C(dt3155_lbase[ minor ], CSR2, i2c_csr2.reg); 470 471 /* enable busmaster chip, clear flags */ 472
+1 -1
drivers/staging/hv/Hv.c
··· 306 DPRINT_ENTER(VMBUS); 307 308 if (gHvContext.SignalEventBuffer) { 309 gHvContext.SignalEventBuffer = NULL; 310 gHvContext.SignalEventParam = NULL; 311 - kfree(gHvContext.SignalEventBuffer); 312 } 313 314 if (gHvContext.HypercallPage) {
··· 306 DPRINT_ENTER(VMBUS); 307 308 if (gHvContext.SignalEventBuffer) { 309 + kfree(gHvContext.SignalEventBuffer); 310 gHvContext.SignalEventBuffer = NULL; 311 gHvContext.SignalEventParam = NULL; 312 } 313 314 if (gHvContext.HypercallPage) {
+1
drivers/staging/hv/RndisFilter.c
··· 751 752 ret = RndisFilterSetPacketFilter(Device, 753 NDIS_PACKET_TYPE_BROADCAST | 754 NDIS_PACKET_TYPE_DIRECTED); 755 if (ret == 0) 756 Device->State = RNDIS_DEV_DATAINITIALIZED;
··· 751 752 ret = RndisFilterSetPacketFilter(Device, 753 NDIS_PACKET_TYPE_BROADCAST | 754 + NDIS_PACKET_TYPE_ALL_MULTICAST | 755 NDIS_PACKET_TYPE_DIRECTED); 756 if (ret == 0) 757 Device->State = RNDIS_DEV_DATAINITIALIZED;
+1 -2
drivers/staging/hv/netvsc_drv.c
··· 403 if (!net_drv_obj->Base.OnDeviceAdd) 404 return -1; 405 406 - net = alloc_netdev(sizeof(struct net_device_context), "seth%d", 407 - ether_setup); 408 if (!net) 409 return -1; 410
··· 403 if (!net_drv_obj->Base.OnDeviceAdd) 404 return -1; 405 406 + net = alloc_etherdev(sizeof(struct net_device_context)); 407 if (!net) 408 return -1; 409
+1 -1
drivers/staging/iio/accel/lis3l02dq_core.c
··· 618 static void lis3l02dq_thresh_handler_bh_no_check(struct work_struct *work_s) 619 { 620 struct iio_work_cont *wc 621 - = container_of(work_s, struct iio_work_cont, ws_nocheck); 622 struct lis3l02dq_state *st = wc->st; 623 u8 t; 624
··· 618 static void lis3l02dq_thresh_handler_bh_no_check(struct work_struct *work_s) 619 { 620 struct iio_work_cont *wc 621 + = container_of(work_s, struct iio_work_cont, ws); 622 struct lis3l02dq_state *st = wc->st; 623 u8 t; 624
+3
drivers/staging/iio/accel/lis3l02dq_ring.c
··· 493 struct lis3l02dq_state *state = indio_dev->dev_data; 494 495 state->trig = iio_allocate_trigger(); 496 state->trig->name = kmalloc(IIO_TRIGGER_NAME_LENGTH, GFP_KERNEL); 497 if (!state->trig->name) { 498 ret = -ENOMEM;
··· 493 struct lis3l02dq_state *state = indio_dev->dev_data; 494 495 state->trig = iio_allocate_trigger(); 496 + if (!state->trig) 497 + return -ENOMEM; 498 + 499 state->trig->name = kmalloc(IIO_TRIGGER_NAME_LENGTH, GFP_KERNEL); 500 if (!state->trig->name) { 501 ret = -ENOMEM;
+2
drivers/staging/iio/adc/max1363_core.c
··· 557 if (!IS_ERR(st->reg)) 558 regulator_put(st->reg); 559 error_free_st: 560 kfree(st); 561 562 error_ret: ··· 575 regulator_disable(st->reg); 576 regulator_put(st->reg); 577 } 578 kfree(st); 579 580 return 0;
··· 557 if (!IS_ERR(st->reg)) 558 regulator_put(st->reg); 559 error_free_st: 560 + i2c_set_clientdata(client, NULL); 561 kfree(st); 562 563 error_ret: ··· 574 regulator_disable(st->reg); 575 regulator_put(st->reg); 576 } 577 + i2c_set_clientdata(client, NULL); 578 kfree(st); 579 580 return 0;
+2 -1
drivers/staging/iio/industrialio-core.c
··· 537 sysfs_remove_group(&dev_info->dev.kobj, dev_info->attrs); 538 } 539 540 int iio_get_new_idr_val(struct idr *this_idr) 541 { 542 int ret; ··· 661 for (i = 0; i < dev_info->num_interrupt_lines; i++) { 662 dev_info->event_interfaces[i].owner = dev_info->driver_module; 663 ret = iio_get_new_idr_val(&iio_event_idr); 664 - if (ret) 665 goto error_free_setup_ev_ints; 666 else 667 dev_info->event_interfaces[i].id = ret;
··· 537 sysfs_remove_group(&dev_info->dev.kobj, dev_info->attrs); 538 } 539 540 + /* Return a negative errno on failure */ 541 int iio_get_new_idr_val(struct idr *this_idr) 542 { 543 int ret; ··· 660 for (i = 0; i < dev_info->num_interrupt_lines; i++) { 661 dev_info->event_interfaces[i].owner = dev_info->driver_module; 662 ret = iio_get_new_idr_val(&iio_event_idr); 663 + if (ret < 0) 664 goto error_free_setup_ev_ints; 665 else 666 dev_info->event_interfaces[i].id = ret;
+2
drivers/staging/iio/light/tsl2563.c
··· 682 fail2: 683 iio_device_unregister(chip->indio_dev); 684 fail1: 685 kfree(chip); 686 return err; 687 } ··· 693 694 iio_device_unregister(chip->indio_dev); 695 696 kfree(chip); 697 return 0; 698 }
··· 682 fail2: 683 iio_device_unregister(chip->indio_dev); 684 fail1: 685 + i2c_set_clientdata(client, NULL); 686 kfree(chip); 687 return err; 688 } ··· 692 693 iio_device_unregister(chip->indio_dev); 694 695 + i2c_set_clientdata(client, NULL); 696 kfree(chip); 697 return 0; 698 }
+1 -1
drivers/staging/iio/ring_sw.c
··· 293 return -EAGAIN; 294 memcpy(data, last_written_p_copy, ring->buf.bpd); 295 296 - if (unlikely(ring->last_written_p >= last_written_p_copy)) 297 goto again; 298 299 iio_unmark_sw_rb_in_use(&ring->buf);
··· 293 return -EAGAIN; 294 memcpy(data, last_written_p_copy, ring->buf.bpd); 295 296 + if (unlikely(ring->last_written_p != last_written_p_copy)) 297 goto again; 298 299 iio_unmark_sw_rb_in_use(&ring->buf);
+1
drivers/staging/rt2860/usb_main_dev.c
··· 63 {USB_DEVICE(0x07D1, 0x3C11)}, /* D-Link */ 64 {USB_DEVICE(0x14B2, 0x3C07)}, /* AL */ 65 {USB_DEVICE(0x050D, 0x8053)}, /* Belkin */ 66 {USB_DEVICE(0x14B2, 0x3C23)}, /* Airlink */ 67 {USB_DEVICE(0x14B2, 0x3C27)}, /* Airlink */ 68 {USB_DEVICE(0x07AA, 0x002F)}, /* Corega */
··· 63 {USB_DEVICE(0x07D1, 0x3C11)}, /* D-Link */ 64 {USB_DEVICE(0x14B2, 0x3C07)}, /* AL */ 65 {USB_DEVICE(0x050D, 0x8053)}, /* Belkin */ 66 + {USB_DEVICE(0x050D, 0x825B)}, /* Belkin */ 67 {USB_DEVICE(0x14B2, 0x3C23)}, /* Airlink */ 68 {USB_DEVICE(0x14B2, 0x3C27)}, /* Airlink */ 69 {USB_DEVICE(0x07AA, 0x002F)}, /* Corega */
+3
drivers/staging/rtl8192su/r8192U_core.c
··· 113 114 static const struct usb_device_id rtl8192_usb_id_tbl[] = { 115 /* Realtek */ 116 {USB_DEVICE(0x0bda, 0x8192)}, 117 {USB_DEVICE(0x0bda, 0x8709)}, 118 /* Corega */ 119 {USB_DEVICE(0x07aa, 0x0043)}, 120 /* Belkin */ 121 {USB_DEVICE(0x050d, 0x805E)}, 122 /* Sitecom */ 123 {USB_DEVICE(0x0df6, 0x0031)}, 124 /* EnGenius */ 125 {USB_DEVICE(0x1740, 0x9201)}, 126 /* Dlink */
··· 113 114 static const struct usb_device_id rtl8192_usb_id_tbl[] = { 115 /* 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 */
+3
drivers/staging/usbip/usbip_event.c
··· 117 { 118 struct usbip_task *eh = &ud->eh; 119 120 wait_for_completion(&eh->thread_done); 121 usbip_dbg_eh("usbip_eh has finished\n"); 122 }
··· 117 { 118 struct usbip_task *eh = &ud->eh; 119 120 + if (eh->thread == current) 121 + return; /* do not wait for myself */ 122 + 123 wait_for_completion(&eh->thread_done); 124 usbip_dbg_eh("usbip_eh has finished\n"); 125 }
+2 -1
drivers/staging/vme/bridges/vme_tsi148.c
··· 2455 dev_info(&pdev->dev, "VME Write and flush and error check is %s\n", 2456 err_chk ? "enabled" : "disabled"); 2457 2458 - if (tsi148_crcsr_init(tsi148_bridge, pdev)) 2459 dev_err(&pdev->dev, "CR/CSR configuration failed.\n"); 2460 goto err_crcsr; 2461 2462 retval = vme_register_bridge(tsi148_bridge); 2463 if (retval != 0) {
··· 2455 dev_info(&pdev->dev, "VME Write and flush and error check is %s\n", 2456 err_chk ? "enabled" : "disabled"); 2457 2458 + if (tsi148_crcsr_init(tsi148_bridge, pdev)) { 2459 dev_err(&pdev->dev, "CR/CSR configuration failed.\n"); 2460 goto err_crcsr; 2461 + } 2462 2463 retval = vme_register_bridge(tsi148_bridge); 2464 if (retval != 0) {