aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial/kobil_sct.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/kobil_sct.c')
-rw-r--r--drivers/usb/serial/kobil_sct.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 6b570498287..6db0e561f68 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -69,7 +69,7 @@ static int debug;
/* Function prototypes */
static int kobil_startup(struct usb_serial *serial);
-static void kobil_shutdown(struct usb_serial *serial);
+static void kobil_release(struct usb_serial *serial);
static int kobil_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
static void kobil_close(struct usb_serial_port *port);
@@ -117,7 +117,7 @@ static struct usb_serial_driver kobil_device = {
.id_table = id_table,
.num_ports = 1,
.attach = kobil_startup,
- .shutdown = kobil_shutdown,
+ .release = kobil_release,
.ioctl = kobil_ioctl,
.set_termios = kobil_set_termios,
.tiocmget = kobil_tiocmget,
@@ -201,17 +201,13 @@ static int kobil_startup(struct usb_serial *serial)
}
-static void kobil_shutdown(struct usb_serial *serial)
+static void kobil_release(struct usb_serial *serial)
{
int i;
dbg("%s - port %d", __func__, serial->port[0]->number);
- for (i = 0; i < serial->num_ports; ++i) {
- while (serial->port[i]->port.count > 0)
- kobil_close(serial->port[i]);
+ for (i = 0; i < serial->num_ports; ++i)
kfree(usb_get_serial_port_data(serial->port[i]));
- usb_set_serial_port_data(serial->port[i], NULL);
- }
}