Commit 0c265f4e authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

tty-usb-kl5kusb105: Coding style

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8dd03a5b
......@@ -53,7 +53,7 @@
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <linux/uaccess.h>
#include <asm/unaligned.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
......@@ -72,37 +72,25 @@ static int debug;
/*
* Function prototypes
*/
static int klsi_105_startup (struct usb_serial *serial);
static void klsi_105_shutdown (struct usb_serial *serial);
static int klsi_105_open (struct tty_struct *tty,
struct usb_serial_port *port,
struct file *filp);
static void klsi_105_close (struct tty_struct *tty,
struct usb_serial_port *port,
struct file *filp);
static int klsi_105_write (struct tty_struct *tty,
struct usb_serial_port *port,
const unsigned char *buf,
int count);
static void klsi_105_write_bulk_callback (struct urb *urb);
static int klsi_105_chars_in_buffer (struct tty_struct *tty);
static int klsi_105_write_room (struct tty_struct *tty);
static void klsi_105_read_bulk_callback (struct urb *urb);
static void klsi_105_set_termios (struct tty_struct *tty,
struct usb_serial_port *port,
struct ktermios *old);
static void klsi_105_throttle (struct tty_struct *tty);
static void klsi_105_unthrottle (struct tty_struct *tty);
/*
static void klsi_105_break_ctl (struct tty_struct *tty,
int break_state );
*/
static int klsi_105_tiocmget (struct tty_struct *tty,
struct file *file);
static int klsi_105_tiocmset (struct tty_struct *tty,
struct file *file, unsigned int set,
unsigned int clear);
static int klsi_105_startup(struct usb_serial *serial);
static void klsi_105_shutdown(struct usb_serial *serial);
static int klsi_105_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
static void klsi_105_close(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
static int klsi_105_write(struct tty_struct *tty,
struct usb_serial_port *port, const unsigned char *buf, int count);
static void klsi_105_write_bulk_callback(struct urb *urb);
static int klsi_105_chars_in_buffer(struct tty_struct *tty);
static int klsi_105_write_room(struct tty_struct *tty);
static void klsi_105_read_bulk_callback(struct urb *urb);
static void klsi_105_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct ktermios *old);
static void klsi_105_throttle(struct tty_struct *tty);
static void klsi_105_unthrottle(struct tty_struct *tty);
static int klsi_105_tiocmget(struct tty_struct *tty, struct file *file);
static int klsi_105_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
/*
* All of the device info needed for the KLSI converters.
......@@ -113,7 +101,7 @@ static struct usb_device_id id_table [] = {
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, id_table);
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver kl5kusb105d_driver = {
.name = "kl5kusb105d",
......@@ -138,7 +126,7 @@ static struct usb_serial_driver kl5kusb105d_device = {
.write_bulk_callback = klsi_105_write_bulk_callback,
.chars_in_buffer = klsi_105_chars_in_buffer,
.write_room = klsi_105_write_room,
.read_bulk_callback =klsi_105_read_bulk_callback,
.read_bulk_callback = klsi_105_read_bulk_callback,
.set_termios = klsi_105_set_termios,
/*.break_ctl = klsi_105_break_ctl,*/
.tiocmget = klsi_105_tiocmget,
......@@ -165,7 +153,7 @@ struct klsi_105_private {
struct ktermios termios;
unsigned long line_state; /* modem line settings */
/* write pool */
struct urb * write_urb_pool[NUM_URBS];
struct urb *write_urb_pool[NUM_URBS];
spinlock_t lock;
unsigned long bytes_in;
unsigned long bytes_out;
......@@ -224,7 +212,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
unsigned long *line_state_p)
{
int rc;
__u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1};
__u8 status_buf[KLSI_STATUSBUF_LEN] = { -1, -1};
__u16 status;
info("%s - sending SIO Poll request", __func__);
......@@ -247,7 +235,6 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
*line_state_p = klsi_105_status2linestate(status);
}
return rc;
}
......@@ -256,7 +243,7 @@ static int klsi_105_get_line_state(struct usb_serial_port *port,
* Driver's tty interface functions
*/
static int klsi_105_startup (struct usb_serial *serial)
static int klsi_105_startup(struct usb_serial *serial)
{
struct klsi_105_private *priv;
int i, j;
......@@ -266,7 +253,7 @@ static int klsi_105_startup (struct usb_serial *serial)
*/
/* allocate the private data structure */
for (i=0; i<serial->num_ports; i++) {
for (i = 0; i < serial->num_ports; i++) {
priv = kmalloc(sizeof(struct klsi_105_private),
GFP_KERNEL);
if (!priv) {
......@@ -287,9 +274,9 @@ static int klsi_105_startup (struct usb_serial *serial)
priv->bytes_out = 0;
usb_set_serial_port_data(serial->port[i], priv);
spin_lock_init (&priv->lock);
for (j=0; j<NUM_URBS; j++) {
struct urb* urb = usb_alloc_urb(0, GFP_KERNEL);
spin_lock_init(&priv->lock);
for (j = 0; j < NUM_URBS; j++) {
struct urb *urb = usb_alloc_urb(0, GFP_KERNEL);
priv->write_urb_pool[j] = urb;
if (urb == NULL) {
......@@ -297,10 +284,11 @@ static int klsi_105_startup (struct usb_serial *serial)
goto err_cleanup;
}
urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE,
GFP_KERNEL);
urb->transfer_buffer =
kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
if (!urb->transfer_buffer) {
err("%s - out of memory for urb buffers.", __func__);
err("%s - out of memory for urb buffers.",
__func__);
goto err_cleanup;
}
}
......@@ -314,7 +302,7 @@ static int klsi_105_startup (struct usb_serial *serial)
err_cleanup:
for (; i >= 0; i--) {
priv = usb_get_serial_port_data(serial->port[i]);
for (j=0; j < NUM_URBS; j++) {
for (j = 0; j < NUM_URBS; j++) {
if (priv->write_urb_pool[j]) {
kfree(priv->write_urb_pool[j]->transfer_buffer);
usb_free_urb(priv->write_urb_pool[j]);
......@@ -326,22 +314,23 @@ err_cleanup:
} /* klsi_105_startup */
static void klsi_105_shutdown (struct usb_serial *serial)
static void klsi_105_shutdown(struct usb_serial *serial)
{
int i;
dbg("%s", __func__);
/* stop reads and writes on all ports */
for (i=0; i < serial->num_ports; ++i) {
struct klsi_105_private *priv = usb_get_serial_port_data(serial->port[i]);
for (i = 0; i < serial->num_ports; ++i) {
struct klsi_105_private *priv =
usb_get_serial_port_data(serial->port[i]);
unsigned long flags;
if (priv) {
/* kill our write urb pool */
int j;
struct urb **write_urbs = priv->write_urb_pool;
spin_lock_irqsave(&priv->lock,flags);
spin_lock_irqsave(&priv->lock, flags);
for (j = 0; j < NUM_URBS; j++) {
if (write_urbs[j]) {
......@@ -353,12 +342,10 @@ static void klsi_105_shutdown (struct usb_serial *serial)
* oopses. */
/* usb_kill_urb(write_urbs[j]); */
kfree(write_urbs[j]->transfer_buffer);
usb_free_urb (write_urbs[j]);
usb_free_urb(write_urbs[j]);
}
}
spin_unlock_irqrestore (&priv->lock, flags);
spin_unlock_irqrestore(&priv->lock, flags);
kfree(priv);
usb_set_serial_port_data(serial->port[i], NULL);
}
......@@ -397,19 +384,19 @@ static int klsi_105_open(struct tty_struct *tty,
klsi_105_chg_port_settings(port, &cfg);
/* set up termios structure */
spin_lock_irqsave (&priv->lock, flags);
spin_lock_irqsave(&priv->lock, flags);
priv->termios.c_iflag = tty->termios->c_iflag;
priv->termios.c_oflag = tty->termios->c_oflag;
priv->termios.c_cflag = tty->termios->c_cflag;
priv->termios.c_lflag = tty->termios->c_lflag;
for (i=0; i<NCCS; i++)
for (i = 0; i < NCCS; i++)
priv->termios.c_cc[i] = tty->termios->c_cc[i];
priv->cfg.pktlen = cfg.pktlen;
priv->cfg.baudrate = cfg.baudrate;
priv->cfg.databits = cfg.databits;
priv->cfg.unknown1 = cfg.unknown1;
priv->cfg.unknown2 = cfg.unknown2;
spin_unlock_irqrestore (&priv->lock, flags);
spin_unlock_irqrestore(&priv->lock, flags);
/* READ_ON and urb submission */
usb_fill_bulk_urb(port->read_urb, port->serial->dev,
......@@ -428,7 +415,7 @@ static int klsi_105_open(struct tty_struct *tty,
}
rc = usb_control_msg(port->serial->dev,
usb_sndctrlpipe(port->serial->dev,0),
usb_sndctrlpipe(port->serial->dev, 0),
KL5KUSB105A_SIO_CONFIGURE,
USB_TYPE_VENDOR|USB_DIR_OUT|USB_RECIP_INTERFACE,
KL5KUSB105A_SIO_CONFIGURE_READ_ON,
......@@ -444,9 +431,9 @@ static int klsi_105_open(struct tty_struct *tty,
rc = klsi_105_get_line_state(port, &line_state);
if (rc >= 0) {
spin_lock_irqsave (&priv->lock, flags);
spin_lock_irqsave(&priv->lock, flags);
priv->line_state = line_state;
spin_unlock_irqrestore (&priv->lock, flags);
spin_unlock_irqrestore(&priv->lock, flags);
dbg("%s - read line state 0x%lx", __func__, line_state);
retval = 0;
} else
......@@ -468,7 +455,7 @@ static void klsi_105_close(struct tty_struct *tty,
mutex_lock(&port->serial->disc_mutex);
if (!port->serial->disconnected) {
/* send READ_OFF */
rc = usb_control_msg (port->serial->dev,
rc = usb_control_msg(port->serial->dev,
usb_sndctrlpipe(port->serial->dev, 0),
KL5KUSB105A_SIO_CONFIGURE,
USB_TYPE_VENDOR | USB_DIR_OUT,
......@@ -488,7 +475,8 @@ static void klsi_105_close(struct tty_struct *tty,
/* FIXME */
/* wgg - do I need this? I think so. */
usb_kill_urb(port->interrupt_in_urb);
info("kl5kusb105 port stats: %ld bytes in, %ld bytes out", priv->bytes_in, priv->bytes_out);
info("kl5kusb105 port stats: %ld bytes in, %ld bytes out",
priv->bytes_in, priv->bytes_out);
} /* klsi_105_close */
......@@ -504,7 +492,7 @@ static int klsi_105_write(struct tty_struct *tty,
{
struct klsi_105_private *priv = usb_get_serial_port_data(port);
int result, size;
int bytes_sent=0;
int bytes_sent = 0;
dbg("%s - port %d", __func__, port->number);
......@@ -513,34 +501,37 @@ static int klsi_105_write(struct tty_struct *tty,
struct urb *urb = NULL;
unsigned long flags;
int i;
/* since the pool is per-port we might not need the spin lock !? */
spin_lock_irqsave (&priv->lock, flags);
for (i=0; i<NUM_URBS; i++) {
/* since the pool is per-port we might not need
the spin lock !? */
spin_lock_irqsave(&priv->lock, flags);
for (i = 0; i < NUM_URBS; i++) {
if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
urb = priv->write_urb_pool[i];
dbg("%s - using pool URB %d", __func__, i);
break;
}
}
spin_unlock_irqrestore (&priv->lock, flags);
spin_unlock_irqrestore(&priv->lock, flags);
if (urb==NULL) {
if (urb == NULL) {
dbg("%s - no more free urbs", __func__);
goto exit;
}
if (urb->transfer_buffer == NULL) {
urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
urb->transfer_buffer =
kmalloc(URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
if (urb->transfer_buffer == NULL) {
err("%s - no more kernel memory...", __func__);
goto exit;
}
}
size = min (count, port->bulk_out_size - KLSI_105_DATA_OFFSET);
size = min (size, URB_TRANSFER_BUFFER_SIZE - KLSI_105_DATA_OFFSET);
size = min(count, port->bulk_out_size - KLSI_105_DATA_OFFSET);
size = min(size, URB_TRANSFER_BUFFER_SIZE -
KLSI_105_DATA_OFFSET);
memcpy (urb->transfer_buffer + KLSI_105_DATA_OFFSET, buf, size);
memcpy(urb->transfer_buffer + KLSI_105_DATA_OFFSET, buf, size);
/* write payload size into transfer buffer */
((__u8 *)urb->transfer_buffer)[0] = (__u8) (size & 0xFF);
......@@ -558,7 +549,8 @@ static int klsi_105_write(struct tty_struct *tty,
/* send the data out the bulk port */
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result) {
err("%s - failed submitting write urb, error %d", __func__, result);
err("%s - failed submitting write urb, error %d",
__func__, result);
goto exit;
}
buf += size;
......@@ -567,12 +559,12 @@ static int klsi_105_write(struct tty_struct *tty,
}
exit:
/* lockless, but it's for debug info only... */
priv->bytes_out+=bytes_sent;
priv->bytes_out += bytes_sent;
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)
{
struct usb_serial_port *port = urb->context;
int status = urb->status;
......@@ -590,7 +582,7 @@ static void klsi_105_write_bulk_callback ( struct urb *urb)
/* 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)
{
struct usb_serial_port *port = tty->driver_data;
int chars = 0;
......@@ -598,21 +590,20 @@ static int klsi_105_chars_in_buffer (struct tty_struct *tty)
unsigned long flags;
struct klsi_105_private *priv = usb_get_serial_port_data(port);
spin_lock_irqsave (&priv->lock, flags);
spin_lock_irqsave(&priv->lock, flags);
for (i = 0; i < NUM_URBS; ++i) {
if (priv->write_urb_pool[i]->status == -EINPROGRESS) {
if (priv->write_urb_pool[i]->status == -EINPROGRESS)
chars += URB_TRANSFER_BUFFER_SIZE;
}
}
spin_unlock_irqrestore (&priv->lock, flags);
spin_unlock_irqrestore(&priv->lock, flags);
dbg("%s - returns %d", __func__, chars);
return (chars);
return chars;
}
static int klsi_105_write_room (struct tty_struct *tty)
static int klsi_105_write_room(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
unsigned long flags;
......@@ -620,22 +611,21 @@ static int klsi_105_write_room (struct tty_struct *tty)
int room = 0;
struct klsi_105_private *priv = usb_get_serial_port_data(port);
spin_lock_irqsave (&priv->lock, flags);
spin_lock_irqsave(&priv->lock, flags);
for (i = 0; i < NUM_URBS; ++i) {
if (priv->write_urb_pool[i]->status != -EINPROGRESS) {
if (priv->write_urb_pool[i]->status != -EINPROGRESS)
room += URB_TRANSFER_BUFFER_SIZE;
}
}
spin_unlock_irqrestore (&priv->lock, flags);
spin_unlock_irqrestore(&priv->lock, flags);
dbg("%s - returns %d", __func__, room);
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 klsi_105_private *priv = usb_get_serial_port_data(port);
......@@ -703,11 +693,12 @@ static void klsi_105_read_bulk_callback (struct urb *urb)
port);
rc = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (rc)
err("%s - failed resubmitting read urb, error %d", __func__, rc);
err("%s - failed resubmitting read urb, error %d",
__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 ktermios *old_termios)
{
......@@ -721,28 +712,27 @@ static void klsi_105_set_termios (struct tty_struct *tty,
speed_t baud;
/* lock while we are modifying the settings */
spin_lock_irqsave (&priv->lock, flags);
spin_lock_irqsave(&priv->lock, flags);
/*
* Update baud rate
*/
baud = tty_get_baud_rate(tty);
if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
if ((cflag & CBAUD) != (old_cflag & CBAUD)) {
/* reassert DTR and (maybe) RTS on transition from B0 */
if( (old_cflag & CBAUD) == B0 ) {
if ((old_cflag & CBAUD) == B0) {
dbg("%s: baud was B0", __func__);
#if 0
priv->control_state |= TIOCM_DTR;
/* don't set RTS if using hardware flow control */
if (!(old_cflag & CRTSCTS)) {
if (!(old_cflag & CRTSCTS))
priv->control_state |= TIOCM_RTS;
}
mct_u232_set_modem_ctrl(serial, priv->control_state);
#endif
}
}
switch(baud) {
switch (baud) {
case 0: /* handled below */
break;
case 1200:
......@@ -771,13 +761,12 @@ static void klsi_105_set_termios (struct tty_struct *tty,
break;
default:
dbg("KLSI USB->Serial converter:"
" unsupported baudrate request, using default"
" of 9600");
" unsupported baudrate request, using default of 9600");
priv->cfg.baudrate = kl5kusb105a_sio_b9600;
baud = 9600;
break;
}
if ((cflag & CBAUD) == B0 ) {
if ((cflag & CBAUD) == B0) {
dbg("%s: baud is B0", __func__);
/* Drop RTS and DTR */
/* maybe this should be simulated by sending read
......@@ -796,11 +785,11 @@ static void klsi_105_set_termios (struct tty_struct *tty,
switch (cflag & CSIZE) {
case CS5:
dbg("%s - 5 bits/byte not supported", __func__);
spin_unlock_irqrestore (&priv->lock, flags);
spin_unlock_irqrestore(&priv->lock, flags);
return ;
case CS6:
dbg("%s - 6 bits/byte not supported", __func__);
spin_unlock_irqrestore (&priv->lock, flags);
spin_unlock_irqrestore(&priv->lock, flags);
return ;
case CS7:
priv->cfg.databits = kl5kusb105a_dtb_7;
......@@ -819,8 +808,7 @@ static void klsi_105_set_termios (struct tty_struct *tty,
* Update line control register (LCR)
*/
if ((cflag & (PARENB|PARODD)) != (old_cflag & (PARENB|PARODD))
|| (cflag & CSTOPB) != (old_cflag & CSTOPB) ) {
|| (cflag & CSTOPB) != (old_cflag & CSTOPB)) {
/* Not currently supported */
tty->termios->c_cflag &= ~(PARENB|PARODD|CSTOPB);
#if 0
......@@ -841,20 +829,18 @@ static void klsi_105_set_termios (struct tty_struct *tty,
#endif
;
}
/*
* Set flow control: well, I do not really now how to handle DTR/RTS.
* Just do what we have seen with SniffUSB on Win98.
*/
if( (iflag & IXOFF) != (old_iflag & IXOFF)
if ((iflag & IXOFF) != (old_iflag & IXOFF)
|| (iflag & IXON) != (old_iflag & IXON)
|| (cflag & CRTSCTS) != (old_cflag & CRTSCTS) ) {
|| (cflag & CRTSCTS) != (old_cflag & CRTSCTS)) {
/* Not currently supported */
tty->termios->c_cflag &= ~CRTSCTS;
/* Drop DTR/RTS if no flow control otherwise assert */
#if 0
if ((iflag & IXOFF) || (iflag & IXON) || (cflag & CRTSCTS) )
if ((iflag & IXOFF) || (iflag & IXON) || (cflag & CRTSCTS))
priv->control_state |= TIOCM_DTR | TIOCM_RTS;
else
priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS);
......@@ -862,8 +848,8 @@ static void klsi_105_set_termios (struct tty_struct *tty,
#endif
;
}
memcpy (&cfg, &priv->cfg, sizeof(cfg));
spin_unlock_irqrestore (&priv->lock, flags);
memcpy(&cfg, &priv->cfg, sizeof(cfg));
spin_unlock_irqrestore(&priv->lock, flags);
/* now commit changes to device */
klsi_105_chg_port_settings(port, &cfg);
......@@ -871,11 +857,12 @@ static void klsi_105_set_termios (struct tty_struct *tty,
#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)
{
struct usb_serial_port *port = tty->driver_data;
struct usb_serial *serial = port->serial;
struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
struct mct_u232_private *priv =
(struct mct_u232_private *)port->private;
unsigned char lcr = priv->last_lcr;
dbg("%sstate=%d", __func__, break_state);
......@@ -887,7 +874,7 @@ static void mct_u232_break_ctl( struct tty_struct *tty, int break_state )
} /* mct_u232_break_ctl */
#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)
{
struct usb_serial_port *port = tty->driver_data;
struct klsi_105_private *priv = usb_get_serial_port_data(port);
......@@ -903,14 +890,14 @@ static int klsi_105_tiocmget (struct tty_struct *tty, struct file *file)
return rc;
}
spin_lock_irqsave (&priv->lock, flags);
spin_lock_irqsave(&priv->lock, flags);
priv->line_state = line_state;
spin_unlock_irqrestore (&priv->lock, flags);
spin_unlock_irqrestore(&priv->lock, flags);
dbg("%s - read line state 0x%lx", __func__, line_state);
return (int)line_state;
}
static int klsi_105_tiocmset (struct tty_struct *tty, struct file *file,
static int klsi_105_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
{
int retval = -EINVAL;
......@@ -939,14 +926,14 @@ static int klsi_105_tiocmset (struct tty_struct *tty, struct file *file,
return retval;
}
static void klsi_105_throttle (struct tty_struct *tty)
static void klsi_105_throttle(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
dbg("%s - port %d", __func__, port->number);
usb_kill_urb(port->read_urb);
}
static void klsi_105_unthrottle (struct tty_struct *tty)
static void klsi_105_unthrottle(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
int result;
......@@ -962,7 +949,7 @@ 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;
retval = usb_serial_register(&kl5kusb105d_device);
......@@ -981,18 +968,18 @@ failed_usb_serial_register:
}
static void __exit klsi_105_exit (void)
static void __exit klsi_105_exit(void)
{
usb_deregister (&kl5kusb105d_driver);
usb_serial_deregister (&kl5kusb105d_device);
usb_deregister(&kl5kusb105d_driver);
usb_serial_deregister(&kl5kusb105d_device);
}
module_init (klsi_105_init);
module_exit (klsi_105_exit);
module_init(klsi_105_init);
module_exit(klsi_105_exit);
MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC );
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
......
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