Commit be1066bb authored by Linus Torvalds's avatar Linus Torvalds

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.
parents 87156d69 4839737b
...@@ -464,9 +464,9 @@ static void dt3155_init_isr(int minor) ...@@ -464,9 +464,9 @@ static void dt3155_init_isr(int minor)
/* 50/60 Hz should be set before this point but let's make sure it is */ /* 50/60 Hz should be set before this point but let's make sure it is */
/* right anyway */ /* right anyway */
ReadI2C(dt3155_lbase[ minor ], CONFIG, &i2c_csr2.reg); ReadI2C(dt3155_lbase[ minor ], CSR2, &i2c_csr2.reg);
i2c_csr2.fld.HZ50 = FORMAT50HZ; i2c_csr2.fld.HZ50 = FORMAT50HZ;
WriteI2C(dt3155_lbase[ minor ], CONFIG, i2c_config.reg); WriteI2C(dt3155_lbase[ minor ], CSR2, i2c_csr2.reg);
/* enable busmaster chip, clear flags */ /* enable busmaster chip, clear flags */
......
...@@ -306,9 +306,9 @@ void HvCleanup(void) ...@@ -306,9 +306,9 @@ void HvCleanup(void)
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
if (gHvContext.SignalEventBuffer) { if (gHvContext.SignalEventBuffer) {
kfree(gHvContext.SignalEventBuffer);
gHvContext.SignalEventBuffer = NULL; gHvContext.SignalEventBuffer = NULL;
gHvContext.SignalEventParam = NULL; gHvContext.SignalEventParam = NULL;
kfree(gHvContext.SignalEventBuffer);
} }
if (gHvContext.HypercallPage) { if (gHvContext.HypercallPage) {
......
...@@ -751,6 +751,7 @@ static int RndisFilterOpenDevice(struct rndis_device *Device) ...@@ -751,6 +751,7 @@ static int RndisFilterOpenDevice(struct rndis_device *Device)
ret = RndisFilterSetPacketFilter(Device, ret = RndisFilterSetPacketFilter(Device,
NDIS_PACKET_TYPE_BROADCAST | NDIS_PACKET_TYPE_BROADCAST |
NDIS_PACKET_TYPE_ALL_MULTICAST |
NDIS_PACKET_TYPE_DIRECTED); NDIS_PACKET_TYPE_DIRECTED);
if (ret == 0) if (ret == 0)
Device->State = RNDIS_DEV_DATAINITIALIZED; Device->State = RNDIS_DEV_DATAINITIALIZED;
......
...@@ -403,8 +403,7 @@ static int netvsc_probe(struct device *device) ...@@ -403,8 +403,7 @@ static int netvsc_probe(struct device *device)
if (!net_drv_obj->Base.OnDeviceAdd) if (!net_drv_obj->Base.OnDeviceAdd)
return -1; return -1;
net = alloc_netdev(sizeof(struct net_device_context), "seth%d", net = alloc_etherdev(sizeof(struct net_device_context));
ether_setup);
if (!net) if (!net)
return -1; return -1;
......
...@@ -618,7 +618,7 @@ static int lis3l02dq_thresh_handler_th(struct iio_dev *dev_info, ...@@ -618,7 +618,7 @@ static int lis3l02dq_thresh_handler_th(struct iio_dev *dev_info,
static void lis3l02dq_thresh_handler_bh_no_check(struct work_struct *work_s) static void lis3l02dq_thresh_handler_bh_no_check(struct work_struct *work_s)
{ {
struct iio_work_cont *wc struct iio_work_cont *wc
= container_of(work_s, struct iio_work_cont, ws_nocheck); = container_of(work_s, struct iio_work_cont, ws);
struct lis3l02dq_state *st = wc->st; struct lis3l02dq_state *st = wc->st;
u8 t; u8 t;
......
...@@ -493,6 +493,9 @@ int lis3l02dq_probe_trigger(struct iio_dev *indio_dev) ...@@ -493,6 +493,9 @@ int lis3l02dq_probe_trigger(struct iio_dev *indio_dev)
struct lis3l02dq_state *state = indio_dev->dev_data; struct lis3l02dq_state *state = indio_dev->dev_data;
state->trig = iio_allocate_trigger(); state->trig = iio_allocate_trigger();
if (!state->trig)
return -ENOMEM;
state->trig->name = kmalloc(IIO_TRIGGER_NAME_LENGTH, GFP_KERNEL); state->trig->name = kmalloc(IIO_TRIGGER_NAME_LENGTH, GFP_KERNEL);
if (!state->trig->name) { if (!state->trig->name) {
ret = -ENOMEM; ret = -ENOMEM;
......
...@@ -557,6 +557,7 @@ error_put_reg: ...@@ -557,6 +557,7 @@ error_put_reg:
if (!IS_ERR(st->reg)) if (!IS_ERR(st->reg))
regulator_put(st->reg); regulator_put(st->reg);
error_free_st: error_free_st:
i2c_set_clientdata(client, NULL);
kfree(st); kfree(st);
error_ret: error_ret:
...@@ -574,6 +575,7 @@ static int max1363_remove(struct i2c_client *client) ...@@ -574,6 +575,7 @@ static int max1363_remove(struct i2c_client *client)
regulator_disable(st->reg); regulator_disable(st->reg);
regulator_put(st->reg); regulator_put(st->reg);
} }
i2c_set_clientdata(client, NULL);
kfree(st); kfree(st);
return 0; return 0;
......
...@@ -537,6 +537,7 @@ static void iio_device_unregister_sysfs(struct iio_dev *dev_info) ...@@ -537,6 +537,7 @@ static void iio_device_unregister_sysfs(struct iio_dev *dev_info)
sysfs_remove_group(&dev_info->dev.kobj, dev_info->attrs); sysfs_remove_group(&dev_info->dev.kobj, dev_info->attrs);
} }
/* Return a negative errno on failure */
int iio_get_new_idr_val(struct idr *this_idr) int iio_get_new_idr_val(struct idr *this_idr)
{ {
int ret; int ret;
...@@ -660,7 +661,7 @@ static int iio_device_register_eventset(struct iio_dev *dev_info) ...@@ -660,7 +661,7 @@ static int iio_device_register_eventset(struct iio_dev *dev_info)
for (i = 0; i < dev_info->num_interrupt_lines; i++) { for (i = 0; i < dev_info->num_interrupt_lines; i++) {
dev_info->event_interfaces[i].owner = dev_info->driver_module; dev_info->event_interfaces[i].owner = dev_info->driver_module;
ret = iio_get_new_idr_val(&iio_event_idr); ret = iio_get_new_idr_val(&iio_event_idr);
if (ret) if (ret < 0)
goto error_free_setup_ev_ints; goto error_free_setup_ev_ints;
else else
dev_info->event_interfaces[i].id = ret; dev_info->event_interfaces[i].id = ret;
......
...@@ -682,6 +682,7 @@ static int __devinit tsl2563_probe(struct i2c_client *client, ...@@ -682,6 +682,7 @@ static int __devinit tsl2563_probe(struct i2c_client *client,
fail2: fail2:
iio_device_unregister(chip->indio_dev); iio_device_unregister(chip->indio_dev);
fail1: fail1:
i2c_set_clientdata(client, NULL);
kfree(chip); kfree(chip);
return err; return err;
} }
...@@ -692,6 +693,7 @@ static int tsl2563_remove(struct i2c_client *client) ...@@ -692,6 +693,7 @@ static int tsl2563_remove(struct i2c_client *client)
iio_device_unregister(chip->indio_dev); iio_device_unregister(chip->indio_dev);
i2c_set_clientdata(client, NULL);
kfree(chip); kfree(chip);
return 0; return 0;
} }
......
...@@ -293,7 +293,7 @@ again: ...@@ -293,7 +293,7 @@ again:
return -EAGAIN; return -EAGAIN;
memcpy(data, last_written_p_copy, ring->buf.bpd); memcpy(data, last_written_p_copy, ring->buf.bpd);
if (unlikely(ring->last_written_p >= last_written_p_copy)) if (unlikely(ring->last_written_p != last_written_p_copy))
goto again; goto again;
iio_unmark_sw_rb_in_use(&ring->buf); iio_unmark_sw_rb_in_use(&ring->buf);
......
...@@ -63,6 +63,7 @@ struct usb_device_id rtusb_usb_id[] = { ...@@ -63,6 +63,7 @@ struct usb_device_id rtusb_usb_id[] = {
{USB_DEVICE(0x07D1, 0x3C11)}, /* D-Link */ {USB_DEVICE(0x07D1, 0x3C11)}, /* D-Link */
{USB_DEVICE(0x14B2, 0x3C07)}, /* AL */ {USB_DEVICE(0x14B2, 0x3C07)}, /* AL */
{USB_DEVICE(0x050D, 0x8053)}, /* Belkin */ {USB_DEVICE(0x050D, 0x8053)}, /* Belkin */
{USB_DEVICE(0x050D, 0x825B)}, /* Belkin */
{USB_DEVICE(0x14B2, 0x3C23)}, /* Airlink */ {USB_DEVICE(0x14B2, 0x3C23)}, /* Airlink */
{USB_DEVICE(0x14B2, 0x3C27)}, /* Airlink */ {USB_DEVICE(0x14B2, 0x3C27)}, /* Airlink */
{USB_DEVICE(0x07AA, 0x002F)}, /* Corega */ {USB_DEVICE(0x07AA, 0x002F)}, /* Corega */
......
...@@ -113,14 +113,17 @@ u32 rt_global_debug_component = \ ...@@ -113,14 +113,17 @@ u32 rt_global_debug_component = \
static const struct usb_device_id rtl8192_usb_id_tbl[] = { static const struct usb_device_id rtl8192_usb_id_tbl[] = {
/* Realtek */ /* Realtek */
{USB_DEVICE(0x0bda, 0x8171)},
{USB_DEVICE(0x0bda, 0x8192)}, {USB_DEVICE(0x0bda, 0x8192)},
{USB_DEVICE(0x0bda, 0x8709)}, {USB_DEVICE(0x0bda, 0x8709)},
/* Corega */ /* Corega */
{USB_DEVICE(0x07aa, 0x0043)}, {USB_DEVICE(0x07aa, 0x0043)},
/* Belkin */ /* Belkin */
{USB_DEVICE(0x050d, 0x805E)}, {USB_DEVICE(0x050d, 0x805E)},
{USB_DEVICE(0x050d, 0x815F)}, /* Belkin F5D8053 v6 */
/* Sitecom */ /* Sitecom */
{USB_DEVICE(0x0df6, 0x0031)}, {USB_DEVICE(0x0df6, 0x0031)},
{USB_DEVICE(0x0df6, 0x004b)}, /* WL-349 */
/* EnGenius */ /* EnGenius */
{USB_DEVICE(0x1740, 0x9201)}, {USB_DEVICE(0x1740, 0x9201)},
/* Dlink */ /* Dlink */
......
...@@ -117,6 +117,9 @@ void usbip_stop_eh(struct usbip_device *ud) ...@@ -117,6 +117,9 @@ void usbip_stop_eh(struct usbip_device *ud)
{ {
struct usbip_task *eh = &ud->eh; struct usbip_task *eh = &ud->eh;
if (eh->thread == current)
return; /* do not wait for myself */
wait_for_completion(&eh->thread_done); wait_for_completion(&eh->thread_done);
usbip_dbg_eh("usbip_eh has finished\n"); usbip_dbg_eh("usbip_eh has finished\n");
} }
......
...@@ -2455,9 +2455,10 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -2455,9 +2455,10 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
dev_info(&pdev->dev, "VME Write and flush and error check is %s\n", dev_info(&pdev->dev, "VME Write and flush and error check is %s\n",
err_chk ? "enabled" : "disabled"); err_chk ? "enabled" : "disabled");
if (tsi148_crcsr_init(tsi148_bridge, pdev)) if (tsi148_crcsr_init(tsi148_bridge, pdev)) {
dev_err(&pdev->dev, "CR/CSR configuration failed.\n"); dev_err(&pdev->dev, "CR/CSR configuration failed.\n");
goto err_crcsr; goto err_crcsr;
}
retval = vme_register_bridge(tsi148_bridge); retval = vme_register_bridge(tsi148_bridge);
if (retval != 0) { if (retval != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment