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.
This commit is contained in:
Linus Torvalds 2010-04-30 10:16:55 -07:00
commit be1066bbcd
14 changed files with 25 additions and 9 deletions

View File

@ -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 */
/* right anyway */
ReadI2C(dt3155_lbase[ minor ], CONFIG, &i2c_csr2.reg);
ReadI2C(dt3155_lbase[ minor ], CSR2, &i2c_csr2.reg);
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 */

View File

@ -306,9 +306,9 @@ void HvCleanup(void)
DPRINT_ENTER(VMBUS);
if (gHvContext.SignalEventBuffer) {
kfree(gHvContext.SignalEventBuffer);
gHvContext.SignalEventBuffer = NULL;
gHvContext.SignalEventParam = NULL;
kfree(gHvContext.SignalEventBuffer);
}
if (gHvContext.HypercallPage) {

View File

@ -751,6 +751,7 @@ static int RndisFilterOpenDevice(struct rndis_device *Device)
ret = RndisFilterSetPacketFilter(Device,
NDIS_PACKET_TYPE_BROADCAST |
NDIS_PACKET_TYPE_ALL_MULTICAST |
NDIS_PACKET_TYPE_DIRECTED);
if (ret == 0)
Device->State = RNDIS_DEV_DATAINITIALIZED;

View File

@ -403,8 +403,7 @@ static int netvsc_probe(struct device *device)
if (!net_drv_obj->Base.OnDeviceAdd)
return -1;
net = alloc_netdev(sizeof(struct net_device_context), "seth%d",
ether_setup);
net = alloc_etherdev(sizeof(struct net_device_context));
if (!net)
return -1;

View File

@ -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)
{
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;
u8 t;

View File

@ -493,6 +493,9 @@ int lis3l02dq_probe_trigger(struct iio_dev *indio_dev)
struct lis3l02dq_state *state = indio_dev->dev_data;
state->trig = iio_allocate_trigger();
if (!state->trig)
return -ENOMEM;
state->trig->name = kmalloc(IIO_TRIGGER_NAME_LENGTH, GFP_KERNEL);
if (!state->trig->name) {
ret = -ENOMEM;

View File

@ -557,6 +557,7 @@ static int __devinit max1363_probe(struct i2c_client *client,
if (!IS_ERR(st->reg))
regulator_put(st->reg);
error_free_st:
i2c_set_clientdata(client, NULL);
kfree(st);
error_ret:
@ -574,6 +575,7 @@ static int max1363_remove(struct i2c_client *client)
regulator_disable(st->reg);
regulator_put(st->reg);
}
i2c_set_clientdata(client, NULL);
kfree(st);
return 0;

View File

@ -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);
}
/* Return a negative errno on failure */
int iio_get_new_idr_val(struct idr *this_idr)
{
int ret;
@ -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++) {
dev_info->event_interfaces[i].owner = dev_info->driver_module;
ret = iio_get_new_idr_val(&iio_event_idr);
if (ret)
if (ret < 0)
goto error_free_setup_ev_ints;
else
dev_info->event_interfaces[i].id = ret;

View File

@ -682,6 +682,7 @@ static int __devinit tsl2563_probe(struct i2c_client *client,
fail2:
iio_device_unregister(chip->indio_dev);
fail1:
i2c_set_clientdata(client, NULL);
kfree(chip);
return err;
}
@ -692,6 +693,7 @@ static int tsl2563_remove(struct i2c_client *client)
iio_device_unregister(chip->indio_dev);
i2c_set_clientdata(client, NULL);
kfree(chip);
return 0;
}

View File

@ -293,7 +293,7 @@ int iio_read_last_from_sw_ring(struct iio_sw_ring_buffer *ring,
return -EAGAIN;
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;
iio_unmark_sw_rb_in_use(&ring->buf);

View File

@ -63,6 +63,7 @@ struct usb_device_id rtusb_usb_id[] = {
{USB_DEVICE(0x07D1, 0x3C11)}, /* D-Link */
{USB_DEVICE(0x14B2, 0x3C07)}, /* AL */
{USB_DEVICE(0x050D, 0x8053)}, /* Belkin */
{USB_DEVICE(0x050D, 0x825B)}, /* Belkin */
{USB_DEVICE(0x14B2, 0x3C23)}, /* Airlink */
{USB_DEVICE(0x14B2, 0x3C27)}, /* Airlink */
{USB_DEVICE(0x07AA, 0x002F)}, /* Corega */

View File

@ -113,14 +113,17 @@ u32 rt_global_debug_component = \
static const struct usb_device_id rtl8192_usb_id_tbl[] = {
/* Realtek */
{USB_DEVICE(0x0bda, 0x8171)},
{USB_DEVICE(0x0bda, 0x8192)},
{USB_DEVICE(0x0bda, 0x8709)},
/* Corega */
{USB_DEVICE(0x07aa, 0x0043)},
/* Belkin */
{USB_DEVICE(0x050d, 0x805E)},
{USB_DEVICE(0x050d, 0x815F)}, /* Belkin F5D8053 v6 */
/* Sitecom */
{USB_DEVICE(0x0df6, 0x0031)},
{USB_DEVICE(0x0df6, 0x004b)}, /* WL-349 */
/* EnGenius */
{USB_DEVICE(0x1740, 0x9201)},
/* Dlink */

View File

@ -117,6 +117,9 @@ void usbip_stop_eh(struct usbip_device *ud)
{
struct usbip_task *eh = &ud->eh;
if (eh->thread == current)
return; /* do not wait for myself */
wait_for_completion(&eh->thread_done);
usbip_dbg_eh("usbip_eh has finished\n");
}

View File

@ -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",
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");
goto err_crcsr;
}
retval = vme_register_bridge(tsi148_bridge);
if (retval != 0) {