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

USB: belkin_sa: minor clean-ups

Remove some whitepace and comments.
Clean up close.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a9013176
...@@ -112,7 +112,6 @@ static const struct usb_device_id id_table_combined[] = { ...@@ -112,7 +112,6 @@ static const struct usb_device_id id_table_combined[] = {
{ USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) }, { USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
MODULE_DEVICE_TABLE(usb, id_table_combined); MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver belkin_driver = { static struct usb_driver belkin_driver = {
...@@ -145,7 +144,6 @@ static struct usb_serial_driver belkin_device = { ...@@ -145,7 +144,6 @@ static struct usb_serial_driver belkin_device = {
.release = belkin_sa_release, .release = belkin_sa_release,
}; };
struct belkin_sa_private { struct belkin_sa_private {
spinlock_t lock; spinlock_t lock;
unsigned long control_state; unsigned long control_state;
...@@ -196,22 +194,16 @@ static int belkin_sa_startup(struct usb_serial *serial) ...@@ -196,22 +194,16 @@ static int belkin_sa_startup(struct usb_serial *serial)
return 0; return 0;
} }
static void belkin_sa_release(struct usb_serial *serial) static void belkin_sa_release(struct usb_serial *serial)
{ {
struct belkin_sa_private *priv;
int i; int i;
dbg("%s", __func__); dbg("%s", __func__);
for (i = 0; i < serial->num_ports; ++i) { for (i = 0; i < serial->num_ports; ++i)
/* My special items, the standard routines free my urbs */ kfree(usb_get_serial_port_data(serial->port[i]));
priv = usb_get_serial_port_data(serial->port[i]);
kfree(priv);
}
} }
static int belkin_sa_open(struct tty_struct *tty, static int belkin_sa_open(struct tty_struct *tty,
struct usb_serial_port *port) struct usb_serial_port *port)
{ {
...@@ -239,8 +231,7 @@ static int belkin_sa_open(struct tty_struct *tty, ...@@ -239,8 +231,7 @@ static int belkin_sa_open(struct tty_struct *tty,
exit: exit:
return retval; return retval;
} /* belkin_sa_open */ }
static void belkin_sa_close(struct usb_serial_port *port) static void belkin_sa_close(struct usb_serial_port *port)
{ {
...@@ -248,8 +239,7 @@ static void belkin_sa_close(struct usb_serial_port *port) ...@@ -248,8 +239,7 @@ static void belkin_sa_close(struct usb_serial_port *port)
usb_serial_generic_close(port); usb_serial_generic_close(port);
usb_kill_urb(port->interrupt_in_urb); usb_kill_urb(port->interrupt_in_urb);
} /* belkin_sa_close */ }
static void belkin_sa_read_int_callback(struct urb *urb) static void belkin_sa_read_int_callback(struct urb *urb)
{ {
...@@ -480,8 +470,7 @@ static void belkin_sa_set_termios(struct tty_struct *tty, ...@@ -480,8 +470,7 @@ static void belkin_sa_set_termios(struct tty_struct *tty,
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
priv->control_state = control_state; priv->control_state = control_state;
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
} /* belkin_sa_set_termios */ }
static void belkin_sa_break_ctl(struct tty_struct *tty, int break_state) static void belkin_sa_break_ctl(struct tty_struct *tty, int break_state)
{ {
...@@ -492,7 +481,6 @@ static void belkin_sa_break_ctl(struct tty_struct *tty, int break_state) ...@@ -492,7 +481,6 @@ static void belkin_sa_break_ctl(struct tty_struct *tty, int break_state)
dev_err(&port->dev, "Set break_ctl %d\n", break_state); dev_err(&port->dev, "Set break_ctl %d\n", break_state);
} }
static int belkin_sa_tiocmget(struct tty_struct *tty, struct file *file) static int belkin_sa_tiocmget(struct tty_struct *tty, struct file *file)
{ {
struct usb_serial_port *port = tty->driver_data; struct usb_serial_port *port = tty->driver_data;
...@@ -509,7 +497,6 @@ static int belkin_sa_tiocmget(struct tty_struct *tty, struct file *file) ...@@ -509,7 +497,6 @@ static int belkin_sa_tiocmget(struct tty_struct *tty, struct file *file)
return control_state; return control_state;
} }
static int belkin_sa_tiocmset(struct tty_struct *tty, struct file *file, static int belkin_sa_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear) unsigned int set, unsigned int clear)
{ {
...@@ -581,7 +568,6 @@ static int __init belkin_sa_init(void) ...@@ -581,7 +568,6 @@ static int __init belkin_sa_init(void)
return retval; return retval;
} }
static void __exit belkin_sa_exit (void) static void __exit belkin_sa_exit (void)
{ {
usb_deregister(&belkin_driver); usb_deregister(&belkin_driver);
......
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