Commit ff8c195f authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: kl5usb105: minor clean ups

Whitespace changes and some removed comments.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 313b0d80
...@@ -189,7 +189,7 @@ static int klsi_105_chg_port_settings(struct usb_serial_port *port, ...@@ -189,7 +189,7 @@ static int klsi_105_chg_port_settings(struct usb_serial_port *port,
settings->pktlen, settings->baudrate, settings->databits, settings->pktlen, settings->baudrate, settings->databits,
settings->unknown1, settings->unknown2); settings->unknown1, settings->unknown2);
return rc; return rc;
} /* klsi_105_chg_port_settings */ }
/* translate a 16-bit status value from the device to linux's TIO bits */ /* translate a 16-bit status value from the device to linux's TIO bits */
static unsigned long klsi_105_status2linestate(const __u16 status) static unsigned long klsi_105_status2linestate(const __u16 status)
...@@ -202,6 +202,7 @@ static unsigned long klsi_105_status2linestate(const __u16 status) ...@@ -202,6 +202,7 @@ static unsigned long klsi_105_status2linestate(const __u16 status)
return res; return res;
} }
/* /*
* Read line control via vendor command and return result through * Read line control via vendor command and return result through
* *line_state_p * *line_state_p
...@@ -325,8 +326,7 @@ static int klsi_105_startup(struct usb_serial *serial) ...@@ -325,8 +326,7 @@ static int klsi_105_startup(struct usb_serial *serial)
usb_set_serial_port_data(serial->port[i], NULL); usb_set_serial_port_data(serial->port[i], NULL);
} }
return -ENOMEM; return -ENOMEM;
} /* klsi_105_startup */ }
static void klsi_105_disconnect(struct usb_serial *serial) static void klsi_105_disconnect(struct usb_serial *serial)
{ {
...@@ -352,8 +352,7 @@ static void klsi_105_disconnect(struct usb_serial *serial) ...@@ -352,8 +352,7 @@ static void klsi_105_disconnect(struct usb_serial *serial)
} }
} }
} }
} /* klsi_105_disconnect */ }
static void klsi_105_release(struct usb_serial *serial) static void klsi_105_release(struct usb_serial *serial)
{ {
...@@ -367,7 +366,7 @@ static void klsi_105_release(struct usb_serial *serial) ...@@ -367,7 +366,7 @@ static void klsi_105_release(struct usb_serial *serial)
kfree(priv); kfree(priv);
} }
} /* klsi_105_release */ }
static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port) static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port)
{ {
...@@ -461,8 +460,7 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -461,8 +460,7 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port)
exit: exit:
kfree(cfg); kfree(cfg);
return retval; return retval;
} /* klsi_105_open */ }
static void klsi_105_close(struct usb_serial_port *port) static void klsi_105_close(struct usb_serial_port *port)
{ {
...@@ -498,8 +496,7 @@ static void klsi_105_close(struct usb_serial_port *port) ...@@ -498,8 +496,7 @@ static void klsi_105_close(struct usb_serial_port *port)
dev_info(&port->serial->dev->dev, dev_info(&port->serial->dev->dev,
"port stats: %ld bytes in, %ld bytes out\n", "port stats: %ld bytes in, %ld bytes out\n",
priv->bytes_in, priv->bytes_out); priv->bytes_in, priv->bytes_out);
} /* klsi_105_close */ }
/* We need to write a complete 64-byte data block and encode the /* We need to write a complete 64-byte data block and encode the
* number actually sent in the first double-byte, LSB-order. That * number actually sent in the first double-byte, LSB-order. That
...@@ -507,7 +504,6 @@ static void klsi_105_close(struct usb_serial_port *port) ...@@ -507,7 +504,6 @@ static void klsi_105_close(struct usb_serial_port *port)
*/ */
#define KLSI_105_DATA_OFFSET 2 /* in the bulk urb data block */ #define KLSI_105_DATA_OFFSET 2 /* in the bulk urb data block */
static int klsi_105_write(struct tty_struct *tty, static int klsi_105_write(struct tty_struct *tty,
struct usb_serial_port *port, const unsigned char *buf, int count) struct usb_serial_port *port, const unsigned char *buf, int count)
{ {
...@@ -586,7 +582,7 @@ static int klsi_105_write(struct tty_struct *tty, ...@@ -586,7 +582,7 @@ static int klsi_105_write(struct tty_struct *tty,
priv->bytes_out += bytes_sent; priv->bytes_out += bytes_sent;
return bytes_sent; /* that's how much we wrote */ return bytes_sent; /* that's how much we wrote */
} /* klsi_105_write */ }
static void klsi_105_write_bulk_callback(struct urb *urb) static void klsi_105_write_bulk_callback(struct urb *urb)
{ {
...@@ -602,8 +598,7 @@ static void klsi_105_write_bulk_callback(struct urb *urb) ...@@ -602,8 +598,7 @@ static void klsi_105_write_bulk_callback(struct urb *urb)
} }
usb_serial_port_softint(port); usb_serial_port_softint(port);
} /* klsi_105_write_bulk_completion_callback */ }
/* return number of characters currently in the writing process */ /* return number of characters currently in the writing process */
static int klsi_105_chars_in_buffer(struct tty_struct *tty) static int klsi_105_chars_in_buffer(struct tty_struct *tty)
...@@ -647,8 +642,6 @@ static int klsi_105_write_room(struct tty_struct *tty) ...@@ -647,8 +642,6 @@ static int klsi_105_write_room(struct tty_struct *tty)
return room; return room;
} }
static void klsi_105_read_bulk_callback(struct urb *urb) static void klsi_105_read_bulk_callback(struct urb *urb)
{ {
struct usb_serial_port *port = urb->context; struct usb_serial_port *port = urb->context;
...@@ -720,8 +713,7 @@ static void klsi_105_read_bulk_callback(struct urb *urb) ...@@ -720,8 +713,7 @@ static void klsi_105_read_bulk_callback(struct urb *urb)
dev_err(&port->dev, dev_err(&port->dev,
"%s - failed resubmitting read urb, error %d\n", "%s - failed resubmitting read urb, error %d\n",
__func__, rc); __func__, rc);
} /* klsi_105_read_bulk_callback */ }
static void klsi_105_set_termios(struct tty_struct *tty, static void klsi_105_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct usb_serial_port *port,
...@@ -888,8 +880,7 @@ static void klsi_105_set_termios(struct tty_struct *tty, ...@@ -888,8 +880,7 @@ static void klsi_105_set_termios(struct tty_struct *tty,
klsi_105_chg_port_settings(port, cfg); klsi_105_chg_port_settings(port, cfg);
err: err:
kfree(cfg); kfree(cfg);
} /* klsi_105_set_termios */ }
#if 0 #if 0
static void mct_u232_break_ctl(struct tty_struct *tty, int break_state) static void mct_u232_break_ctl(struct tty_struct *tty, int break_state)
...@@ -907,7 +898,7 @@ static void mct_u232_break_ctl(struct tty_struct *tty, int break_state) ...@@ -907,7 +898,7 @@ static void mct_u232_break_ctl(struct tty_struct *tty, int break_state)
lcr |= MCT_U232_SET_BREAK; lcr |= MCT_U232_SET_BREAK;
mct_u232_set_line_ctrl(serial, lcr); mct_u232_set_line_ctrl(serial, lcr);
} /* mct_u232_break_ctl */ }
#endif #endif
static int klsi_105_tiocmget(struct tty_struct *tty, struct file *file) static int klsi_105_tiocmget(struct tty_struct *tty, struct file *file)
...@@ -986,7 +977,6 @@ static void klsi_105_unthrottle(struct tty_struct *tty) ...@@ -986,7 +977,6 @@ static void klsi_105_unthrottle(struct tty_struct *tty)
} }
static int __init klsi_105_init(void) static int __init klsi_105_init(void)
{ {
int retval; int retval;
...@@ -1006,7 +996,6 @@ static int __init klsi_105_init(void) ...@@ -1006,7 +996,6 @@ static int __init klsi_105_init(void)
return retval; return retval;
} }
static void __exit klsi_105_exit(void) static void __exit klsi_105_exit(void)
{ {
usb_deregister(&kl5kusb105d_driver); usb_deregister(&kl5kusb105d_driver);
...@@ -1024,5 +1013,3 @@ MODULE_LICENSE("GPL"); ...@@ -1024,5 +1013,3 @@ MODULE_LICENSE("GPL");
module_param(debug, bool, S_IRUGO | S_IWUSR); module_param(debug, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "enable extensive debugging messages"); MODULE_PARM_DESC(debug, "enable extensive debugging messages");
/* vim: set sts=8 ts=8 sw=8: */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment