diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-03-21 07:36:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-25 16:42:13 -0400 |
commit | 9993b42b638ec031a55bfe1bc16317cbb5c69722 (patch) | |
tree | a5a3e6433c4da32948d6802e76d7364a0f6288a0 /drivers/usb/serial/usb-serial.c | |
parent | 395e08da8adfe873c5f79e549bb6b7fa5d9f3832 (diff) |
USB: serial: remove redundant comments
Remove redundant comments and fix some minor coding style issues.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 3e290fc2adc4..262beefca71e 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * | 14 | * |
15 | * See Documentation/usb/usb-serial.txt for more information on using this | 15 | * See Documentation/usb/usb-serial.txt for more information on using this |
16 | * driver | 16 | * driver |
17 | * | ||
18 | */ | 17 | */ |
19 | 18 | ||
20 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 19 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
@@ -49,7 +48,6 @@ | |||
49 | drivers depend on it. | 48 | drivers depend on it. |
50 | */ | 49 | */ |
51 | 50 | ||
52 | /* initially all NULL */ | ||
53 | static struct usb_serial *serial_table[SERIAL_TTY_MINORS]; | 51 | static struct usb_serial *serial_table[SERIAL_TTY_MINORS]; |
54 | static DEFINE_MUTEX(table_lock); | 52 | static DEFINE_MUTEX(table_lock); |
55 | static LIST_HEAD(usb_serial_driver_list); | 53 | static LIST_HEAD(usb_serial_driver_list); |
@@ -338,7 +336,6 @@ static int serial_write(struct tty_struct *tty, const unsigned char *buf, | |||
338 | dev_dbg(tty->dev, "%s - port %d, %d byte(s)\n", __func__, | 336 | dev_dbg(tty->dev, "%s - port %d, %d byte(s)\n", __func__, |
339 | port->number, count); | 337 | port->number, count); |
340 | 338 | ||
341 | /* pass on to the driver specific version of this function */ | ||
342 | retval = port->serial->type->write(tty, port, buf, count); | 339 | retval = port->serial->type->write(tty, port, buf, count); |
343 | if (retval < 0) | 340 | if (retval < 0) |
344 | retval = usb_translate_errors(retval); | 341 | retval = usb_translate_errors(retval); |
@@ -351,7 +348,7 @@ static int serial_write_room(struct tty_struct *tty) | |||
351 | struct usb_serial_port *port = tty->driver_data; | 348 | struct usb_serial_port *port = tty->driver_data; |
352 | 349 | ||
353 | dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number); | 350 | dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number); |
354 | /* pass on to the driver specific version of this function */ | 351 | |
355 | return port->serial->type->write_room(tty); | 352 | return port->serial->type->write_room(tty); |
356 | } | 353 | } |
357 | 354 | ||
@@ -381,7 +378,6 @@ static void serial_throttle(struct tty_struct *tty) | |||
381 | 378 | ||
382 | dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number); | 379 | dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number); |
383 | 380 | ||
384 | /* pass on to the driver specific version of this function */ | ||
385 | if (port->serial->type->throttle) | 381 | if (port->serial->type->throttle) |
386 | port->serial->type->throttle(tty); | 382 | port->serial->type->throttle(tty); |
387 | } | 383 | } |
@@ -392,7 +388,6 @@ static void serial_unthrottle(struct tty_struct *tty) | |||
392 | 388 | ||
393 | dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number); | 389 | dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number); |
394 | 390 | ||
395 | /* pass on to the driver specific version of this function */ | ||
396 | if (port->serial->type->unthrottle) | 391 | if (port->serial->type->unthrottle) |
397 | port->serial->type->unthrottle(tty); | 392 | port->serial->type->unthrottle(tty); |
398 | } | 393 | } |
@@ -406,12 +401,11 @@ static int serial_ioctl(struct tty_struct *tty, | |||
406 | dev_dbg(tty->dev, "%s - port %d, cmd 0x%.4x\n", __func__, | 401 | dev_dbg(tty->dev, "%s - port %d, cmd 0x%.4x\n", __func__, |
407 | port->number, cmd); | 402 | port->number, cmd); |
408 | 403 | ||
409 | /* pass on to the driver specific version of this function | 404 | if (port->serial->type->ioctl) |
410 | if it is available */ | ||
411 | if (port->serial->type->ioctl) { | ||
412 | retval = port->serial->type->ioctl(tty, cmd, arg); | 405 | retval = port->serial->type->ioctl(tty, cmd, arg); |
413 | } else | 406 | else |
414 | retval = -ENOIOCTLCMD; | 407 | retval = -ENOIOCTLCMD; |
408 | |||
415 | return retval; | 409 | return retval; |
416 | } | 410 | } |
417 | 411 | ||
@@ -421,8 +415,6 @@ static void serial_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
421 | 415 | ||
422 | dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number); | 416 | dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number); |
423 | 417 | ||
424 | /* pass on to the driver specific version of this function | ||
425 | if it is available */ | ||
426 | if (port->serial->type->set_termios) | 418 | if (port->serial->type->set_termios) |
427 | port->serial->type->set_termios(tty, port, old); | 419 | port->serial->type->set_termios(tty, port, old); |
428 | else | 420 | else |
@@ -435,10 +427,9 @@ static int serial_break(struct tty_struct *tty, int break_state) | |||
435 | 427 | ||
436 | dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number); | 428 | dev_dbg(tty->dev, "%s - port %d\n", __func__, port->number); |
437 | 429 | ||
438 | /* pass on to the driver specific version of this function | ||
439 | if it is available */ | ||
440 | if (port->serial->type->break_ctl) | 430 | if (port->serial->type->break_ctl) |
441 | port->serial->type->break_ctl(tty, break_state); | 431 | port->serial->type->break_ctl(tty, break_state); |
432 | |||
442 | return 0; | 433 | return 0; |
443 | } | 434 | } |
444 | 435 | ||
@@ -1471,7 +1462,6 @@ void usb_serial_deregister_drivers(struct usb_serial_driver *const serial_driver | |||
1471 | } | 1462 | } |
1472 | EXPORT_SYMBOL_GPL(usb_serial_deregister_drivers); | 1463 | EXPORT_SYMBOL_GPL(usb_serial_deregister_drivers); |
1473 | 1464 | ||
1474 | /* Module information */ | ||
1475 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1465 | MODULE_AUTHOR(DRIVER_AUTHOR); |
1476 | MODULE_DESCRIPTION(DRIVER_DESC); | 1466 | MODULE_DESCRIPTION(DRIVER_DESC); |
1477 | MODULE_LICENSE("GPL"); | 1467 | MODULE_LICENSE("GPL"); |