diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-21 14:05:45 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-21 14:05:45 -0500 |
commit | d04cdb64212eb5ae6a98026a97dda626e40e8e9a (patch) | |
tree | b6a7dbb21ccfceb915844e9a330b3d3dfcaf3c5b /drivers/usb/serial/pl2303.c | |
parent | 2f8600dff2b140096a7df781884e918a16aa90e0 (diff) | |
parent | ec1248e70edc5cf7b485efcc7b41e44e10f422e5 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/usb/serial/pl2303.c')
-rw-r--r-- | drivers/usb/serial/pl2303.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 37c81c08faad..b3014fda645c 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -77,6 +77,7 @@ static struct usb_device_id id_table [] = { | |||
77 | { USB_DEVICE(CA_42_CA42_VENDOR_ID, CA_42_CA42_PRODUCT_ID) }, | 77 | { USB_DEVICE(CA_42_CA42_VENDOR_ID, CA_42_CA42_PRODUCT_ID) }, |
78 | { USB_DEVICE(SAGEM_VENDOR_ID, SAGEM_PRODUCT_ID) }, | 78 | { USB_DEVICE(SAGEM_VENDOR_ID, SAGEM_PRODUCT_ID) }, |
79 | { USB_DEVICE(LEADTEK_VENDOR_ID, LEADTEK_9531_PRODUCT_ID) }, | 79 | { USB_DEVICE(LEADTEK_VENDOR_ID, LEADTEK_9531_PRODUCT_ID) }, |
80 | { USB_DEVICE(SPEEDDRAGON_VENDOR_ID, SPEEDDRAGON_PRODUCT_ID) }, | ||
80 | { } /* Terminating entry */ | 81 | { } /* Terminating entry */ |
81 | }; | 82 | }; |
82 | 83 | ||
@@ -218,10 +219,9 @@ static int pl2303_startup (struct usb_serial *serial) | |||
218 | dbg("device type: %d", type); | 219 | dbg("device type: %d", type); |
219 | 220 | ||
220 | for (i = 0; i < serial->num_ports; ++i) { | 221 | for (i = 0; i < serial->num_ports; ++i) { |
221 | priv = kmalloc (sizeof (struct pl2303_private), GFP_KERNEL); | 222 | priv = kzalloc(sizeof(struct pl2303_private), GFP_KERNEL); |
222 | if (!priv) | 223 | if (!priv) |
223 | goto cleanup; | 224 | goto cleanup; |
224 | memset (priv, 0x00, sizeof (struct pl2303_private)); | ||
225 | spin_lock_init(&priv->lock); | 225 | spin_lock_init(&priv->lock); |
226 | priv->buf = pl2303_buf_alloc(PL2303_BUF_SIZE); | 226 | priv->buf = pl2303_buf_alloc(PL2303_BUF_SIZE); |
227 | if (priv->buf == NULL) { | 227 | if (priv->buf == NULL) { |
@@ -383,12 +383,11 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol | |||
383 | } | 383 | } |
384 | } | 384 | } |
385 | 385 | ||
386 | buf = kmalloc (7, GFP_KERNEL); | 386 | buf = kzalloc (7, GFP_KERNEL); |
387 | if (!buf) { | 387 | if (!buf) { |
388 | dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__); | 388 | dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__); |
389 | return; | 389 | return; |
390 | } | 390 | } |
391 | memset (buf, 0x00, 0x07); | ||
392 | 391 | ||
393 | i = usb_control_msg (serial->dev, usb_rcvctrlpipe (serial->dev, 0), | 392 | i = usb_control_msg (serial->dev, usb_rcvctrlpipe (serial->dev, 0), |
394 | GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE, | 393 | GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE, |
@@ -828,6 +827,7 @@ static void pl2303_update_line_status(struct usb_serial_port *port, | |||
828 | spin_lock_irqsave(&priv->lock, flags); | 827 | spin_lock_irqsave(&priv->lock, flags); |
829 | priv->line_status = data[status_idx]; | 828 | priv->line_status = data[status_idx]; |
830 | spin_unlock_irqrestore(&priv->lock, flags); | 829 | spin_unlock_irqrestore(&priv->lock, flags); |
830 | wake_up_interruptible (&priv->delta_msr_wait); | ||
831 | 831 | ||
832 | exit: | 832 | exit: |
833 | return; | 833 | return; |