diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-17 18:43:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-17 18:43:52 -0400 |
commit | 0cfd81031a26717fe14380d18275f8e217571615 (patch) | |
tree | 78a84e4cb97e7f45eb77dc0fbd8857a5dd717869 /drivers/usb/serial/safe_serial.c | |
parent | f7ea4a4ba84f382e8eb143e435551de0feee5b4b (diff) | |
parent | 802f389a2cc6e2771b8de915ac241456d41eb79e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (94 commits)
USB: remove err() macro from more usb drivers
USB: remove err() macro from usb misc drivers
USB: remove err() macro from usb core code
USB: remove err() macro from usb class drivers
USB: remove use of err() in drivers/usb/serial
USB: remove info() macro from usb mtd drivers
USB: remove info() macro from usb input drivers
USB: remove info() macro from usb network drivers
USB: remove info() macro from remaining usb drivers
USB: remove info() macro from usb/misc drivers
USB: remove info() macro from usb/serial drivers
USB: remove warn macro from HID core
USB: remove warn() macro from usb drivers
USB: remove warn() macro from usb net drivers
USB: remove warn() macro from usb media drivers
USB: remove warn() macro from usb input drivers
usb/fsl_qe_udc: clear data toggle on clear halt request
usb/fsl_qe_udc: fix response to get status request
fsl_usb2_udc: Fix oops on probe failure.
fsl_usb2_udc: Add a wmb before priming endpoint.
...
Diffstat (limited to 'drivers/usb/serial/safe_serial.c')
-rw-r--r-- | drivers/usb/serial/safe_serial.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 72903ac9f5c0..4b463cd140ef 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c | |||
@@ -250,17 +250,18 @@ static void safe_read_bulk_callback(struct urb *urb) | |||
250 | if (!fcs) { | 250 | if (!fcs) { |
251 | int actual_length = data[length - 2] >> 2; | 251 | int actual_length = data[length - 2] >> 2; |
252 | if (actual_length <= (length - 2)) { | 252 | if (actual_length <= (length - 2)) { |
253 | info("%s - actual: %d", __func__, | 253 | dev_info(&urb->dev->dev, "%s - actual: %d\n", |
254 | actual_length); | 254 | __func__, actual_length); |
255 | tty_insert_flip_string(tty, | 255 | tty_insert_flip_string(tty, |
256 | data, actual_length); | 256 | data, actual_length); |
257 | tty_flip_buffer_push(tty); | 257 | tty_flip_buffer_push(tty); |
258 | } else { | 258 | } else { |
259 | err("%s - inconsistent lengths %d:%d", | 259 | dev_err(&port->dev, |
260 | "%s - inconsistent lengths %d:%d\n", | ||
260 | __func__, actual_length, length); | 261 | __func__, actual_length, length); |
261 | } | 262 | } |
262 | } else { | 263 | } else { |
263 | err("%s - bad CRC %x", __func__, fcs); | 264 | dev_err(&port->dev, "%s - bad CRC %x\n", __func__, fcs); |
264 | } | 265 | } |
265 | } else { | 266 | } else { |
266 | tty_insert_flip_string(tty, data, length); | 267 | tty_insert_flip_string(tty, data, length); |
@@ -277,8 +278,9 @@ static void safe_read_bulk_callback(struct urb *urb) | |||
277 | 278 | ||
278 | result = usb_submit_urb(urb, GFP_ATOMIC); | 279 | result = usb_submit_urb(urb, GFP_ATOMIC); |
279 | if (result) | 280 | if (result) |
280 | err("%s - failed resubmitting read urb, error %d", | 281 | dev_err(&port->dev, |
281 | __func__, result); | 282 | "%s - failed resubmitting read urb, error %d\n", |
283 | __func__, result); | ||
282 | /* FIXME: Need a mechanism to retry later if this happens */ | 284 | /* FIXME: Need a mechanism to retry later if this happens */ |
283 | } | 285 | } |
284 | 286 | ||
@@ -369,8 +371,9 @@ static int safe_write(struct tty_struct *tty, struct usb_serial_port *port, | |||
369 | result = usb_submit_urb(port->write_urb, GFP_KERNEL); | 371 | result = usb_submit_urb(port->write_urb, GFP_KERNEL); |
370 | if (result) { | 372 | if (result) { |
371 | port->write_urb_busy = 0; | 373 | port->write_urb_busy = 0; |
372 | err("%s - failed submitting write urb, error %d", | 374 | dev_err(&port->dev, |
373 | __func__, result); | 375 | "%s - failed submitting write urb, error %d\n", |
376 | __func__, result); | ||
374 | return 0; | 377 | return 0; |
375 | } | 378 | } |
376 | dbg("%s urb: %p submitted", __func__, port->write_urb); | 379 | dbg("%s urb: %p submitted", __func__, port->write_urb); |
@@ -428,14 +431,13 @@ static int __init safe_init(void) | |||
428 | { | 431 | { |
429 | int i, retval; | 432 | int i, retval; |
430 | 433 | ||
431 | info(DRIVER_VERSION " " DRIVER_AUTHOR); | 434 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" |
432 | info(DRIVER_DESC); | 435 | DRIVER_DESC "\n"); |
433 | info("vendor: %x product: %x safe: %d padded: %d\n", | ||
434 | vendor, product, safe, padded); | ||
435 | 436 | ||
436 | /* if we have vendor / product parameters patch them into id list */ | 437 | /* if we have vendor / product parameters patch them into id list */ |
437 | if (vendor || product) { | 438 | if (vendor || product) { |
438 | info("vendor: %x product: %x\n", vendor, product); | 439 | printk(KERN_INFO KBUILD_MODNAME ": vendor: %x product: %x\n", |
440 | vendor, product); | ||
439 | 441 | ||
440 | for (i = 0; i < ARRAY_SIZE(id_table); i++) { | 442 | for (i = 0; i < ARRAY_SIZE(id_table); i++) { |
441 | if (!id_table[i].idVendor && !id_table[i].idProduct) { | 443 | if (!id_table[i].idVendor && !id_table[i].idProduct) { |