aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/aircable.c
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2007-03-26 10:55:16 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 16:28:37 -0400
commitb19d402a3450bb2597d0c1b54f6139462a5f35ae (patch)
treed455b64d0afa9a34bb29cc9f2f0880de9da4542d /drivers/usb/serial/aircable.c
parent9f8b17e643fe6aa505629658445849397bda4e4f (diff)
USB: aircable cleanup
- proper endianness macros - scheduling in interrupt in error case Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com>
Diffstat (limited to 'drivers/usb/serial/aircable.c')
-rw-r--r--drivers/usb/serial/aircable.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c
index 11dad42c3c60..b675735bfbee 100644
--- a/drivers/usb/serial/aircable.c
+++ b/drivers/usb/serial/aircable.c
@@ -209,6 +209,7 @@ static void aircable_send(struct usb_serial_port *port)
209 int count, result; 209 int count, result;
210 struct aircable_private *priv = usb_get_serial_port_data(port); 210 struct aircable_private *priv = usb_get_serial_port_data(port);
211 unsigned char* buf; 211 unsigned char* buf;
212 u16 *dbuf;
212 dbg("%s - port %d", __FUNCTION__, port->number); 213 dbg("%s - port %d", __FUNCTION__, port->number);
213 if (port->write_urb_busy) 214 if (port->write_urb_busy)
214 return; 215 return;
@@ -226,8 +227,8 @@ static void aircable_send(struct usb_serial_port *port)
226 227
227 buf[0] = TX_HEADER_0; 228 buf[0] = TX_HEADER_0;
228 buf[1] = TX_HEADER_1; 229 buf[1] = TX_HEADER_1;
229 buf[2] = (unsigned char)count; 230 dbuf = (u16 *)&buf[2];
230 buf[3] = (unsigned char)(count >> 8); 231 *dbuf = cpu_to_le16((u16)count);
231 serial_buf_get(priv->tx_buf,buf + HCI_HEADER_LENGTH, MAX_HCI_FRAMESIZE); 232 serial_buf_get(priv->tx_buf,buf + HCI_HEADER_LENGTH, MAX_HCI_FRAMESIZE);
232 233
233 memcpy(port->write_urb->transfer_buffer, buf, 234 memcpy(port->write_urb->transfer_buffer, buf,
@@ -434,7 +435,7 @@ static void aircable_write_bulk_callback(struct urb *urb)
434 __FUNCTION__, urb->status); 435 __FUNCTION__, urb->status);
435 port->write_urb->transfer_buffer_length = 1; 436 port->write_urb->transfer_buffer_length = 1;
436 port->write_urb->dev = port->serial->dev; 437 port->write_urb->dev = port->serial->dev;
437 result = usb_submit_urb(port->write_urb, GFP_KERNEL); 438 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
438 if (result) 439 if (result)
439 dev_err(&urb->dev->dev, 440 dev_err(&urb->dev->dev,
440 "%s - failed resubmitting write urb, error %d\n", 441 "%s - failed resubmitting write urb, error %d\n",