summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cyberjack.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-29 09:16:13 +0200
committerIngo Molnar <mingo@elte.hu>2009-06-29 09:16:25 +0200
commit348b346b238d9c0e5694c8d0b835a099cb383835 (patch)
tree967d9c72a1d6d33a408a1ff0d732296dbe8d3674 /drivers/usb/serial/cyberjack.c
parent6c697bdf08a09ce461e305a22362973036e95db3 (diff)
parent52989765629e7d182b4f146050ebba0abf2cb0b7 (diff)
Merge branch 'linus' into sched/core
Merge reason: we will merge a dependent patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/usb/serial/cyberjack.c')
-rw-r--r--drivers/usb/serial/cyberjack.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 933ba913e66..336523fd736 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -58,7 +58,8 @@ static int debug;
/* Function prototypes */
static int cyberjack_startup(struct usb_serial *serial);
-static void cyberjack_shutdown(struct usb_serial *serial);
+static void cyberjack_disconnect(struct usb_serial *serial);
+static void cyberjack_release(struct usb_serial *serial);
static int cyberjack_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp);
static void cyberjack_close(struct usb_serial_port *port);
@@ -94,7 +95,8 @@ static struct usb_serial_driver cyberjack_device = {
.id_table = id_table,
.num_ports = 1,
.attach = cyberjack_startup,
- .shutdown = cyberjack_shutdown,
+ .disconnect = cyberjack_disconnect,
+ .release = cyberjack_release,
.open = cyberjack_open,
.close = cyberjack_close,
.write = cyberjack_write,
@@ -148,17 +150,25 @@ static int cyberjack_startup(struct usb_serial *serial)
return 0;
}
-static void cyberjack_shutdown(struct usb_serial *serial)
+static void cyberjack_disconnect(struct usb_serial *serial)
{
int i;
dbg("%s", __func__);
- for (i = 0; i < serial->num_ports; ++i) {
+ for (i = 0; i < serial->num_ports; ++i)
usb_kill_urb(serial->port[i]->interrupt_in_urb);
+}
+
+static void cyberjack_release(struct usb_serial *serial)
+{
+ int i;
+
+ dbg("%s", __func__);
+
+ 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]));
- usb_set_serial_port_data(serial->port[i], NULL);
}
}