diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 23:21:04 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 23:21:04 +0300 |
commit | 988addf82e4c03739375279de73929580a2d4a6a (patch) | |
tree | 989ae1cd4e264bbad80c65f04480486246e7b9f3 /drivers/usb/serial/whiteheat.c | |
parent | 004c1c7096659d352b83047a7593e91d8a30e3c5 (diff) | |
parent | 25cf84cf377c0aae5dbcf937ea89bc7893db5176 (diff) | |
download | linux-988addf82e4c03739375279de73929580a2d4a6a.tar.xz |
Merge branch 'origin' into devel-stable
Conflicts:
arch/arm/mach-mx2/devices.c
arch/arm/mach-mx2/devices.h
sound/soc/pxa/pxa-ssp.c
Diffstat (limited to 'drivers/usb/serial/whiteheat.c')
-rw-r--r-- | drivers/usb/serial/whiteheat.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 1093d2eb046a..12ed8209ca72 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c @@ -111,17 +111,17 @@ static int debug; separate ID tables, and then a third table that combines them just for the purpose of exporting the autoloading information. */ -static struct usb_device_id id_table_std [] = { +static const struct usb_device_id id_table_std[] = { { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) }, { } /* Terminating entry */ }; -static struct usb_device_id id_table_prerenumeration [] = { +static const struct usb_device_id id_table_prerenumeration[] = { { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) }, { } /* Terminating entry */ }; -static struct usb_device_id id_table_combined [] = { +static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) }, { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) }, { } /* Terminating entry */ @@ -1492,21 +1492,9 @@ static void rx_data_softint(struct work_struct *work) wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); urb = wrap->urb; - if (tty && urb->actual_length) { - int len = tty_buffer_request_room(tty, - urb->actual_length); - /* This stuff can go away now I suspect */ - if (unlikely(len < urb->actual_length)) { - spin_lock_irqsave(&info->lock, flags); - list_add(tmp, &info->rx_urb_q); - spin_unlock_irqrestore(&info->lock, flags); - tty_flip_buffer_push(tty); - schedule_work(&info->rx_work); - goto out; - } - tty_insert_flip_string(tty, urb->transfer_buffer, len); - sent += len; - } + if (tty && urb->actual_length) + sent += tty_insert_flip_string(tty, + urb->transfer_buffer, urb->actual_length); urb->dev = port->serial->dev; result = usb_submit_urb(urb, GFP_ATOMIC); |