diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 16:06:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 16:06:10 -0400 |
commit | e1f5b94fd0c93c3e27ede88b7ab652d086dc960f (patch) | |
tree | e8de7a132eb88521dd1c19e128eba2d5349bdf4f /drivers/usb/serial/cyberjack.c | |
parent | 6fd03301d76bc439382710e449f58efbb233df1b (diff) | |
parent | 1b6ed69f974f6f32c8be0d9a7fc952822eb83b6f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (143 commits)
USB: xhci depends on PCI.
USB: xhci: Add Makefile, MAINTAINERS, and Kconfig entries.
USB: xhci: Respect critical sections.
USB: xHCI: Fix interrupt moderation.
USB: xhci: Remove packed attribute from structures.
usb; xhci: Fix TRB offset calculations.
USB: xhci: replace if-elseif-else with switch-case
USB: xhci: Make xhci-mem.c include linux/dmapool.h
USB: xhci: drop spinlock in xhci_urb_enqueue() error path.
USB: Change names of SuperSpeed ep companion descriptor structs.
USB: xhci: Avoid compiler reordering in Link TRB giveback.
USB: xhci: Clean up xhci_irq() function.
USB: xhci: Avoid global namespace pollution.
USB: xhci: Fix Link TRB handoff bit twiddling.
USB: xhci: Fix register write order.
USB: xhci: fix some compiler warnings in xhci.h
USB: xhci: fix lots of compiler warnings.
USB: xhci: use xhci_handle_event instead of handle_event
USB: xhci: URB cancellation support.
USB: xhci: Scatter gather list support for bulk transfers.
...
Diffstat (limited to 'drivers/usb/serial/cyberjack.c')
-rw-r--r-- | drivers/usb/serial/cyberjack.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 933ba913e66c..336523fd7366 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c | |||
@@ -58,7 +58,8 @@ static int debug; | |||
58 | 58 | ||
59 | /* Function prototypes */ | 59 | /* Function prototypes */ |
60 | static int cyberjack_startup(struct usb_serial *serial); | 60 | static int cyberjack_startup(struct usb_serial *serial); |
61 | static void cyberjack_shutdown(struct usb_serial *serial); | 61 | static void cyberjack_disconnect(struct usb_serial *serial); |
62 | static void cyberjack_release(struct usb_serial *serial); | ||
62 | static int cyberjack_open(struct tty_struct *tty, | 63 | static int cyberjack_open(struct tty_struct *tty, |
63 | struct usb_serial_port *port, struct file *filp); | 64 | struct usb_serial_port *port, struct file *filp); |
64 | static void cyberjack_close(struct usb_serial_port *port); | 65 | static void cyberjack_close(struct usb_serial_port *port); |
@@ -94,7 +95,8 @@ static struct usb_serial_driver cyberjack_device = { | |||
94 | .id_table = id_table, | 95 | .id_table = id_table, |
95 | .num_ports = 1, | 96 | .num_ports = 1, |
96 | .attach = cyberjack_startup, | 97 | .attach = cyberjack_startup, |
97 | .shutdown = cyberjack_shutdown, | 98 | .disconnect = cyberjack_disconnect, |
99 | .release = cyberjack_release, | ||
98 | .open = cyberjack_open, | 100 | .open = cyberjack_open, |
99 | .close = cyberjack_close, | 101 | .close = cyberjack_close, |
100 | .write = cyberjack_write, | 102 | .write = cyberjack_write, |
@@ -148,17 +150,25 @@ static int cyberjack_startup(struct usb_serial *serial) | |||
148 | return 0; | 150 | return 0; |
149 | } | 151 | } |
150 | 152 | ||
151 | static void cyberjack_shutdown(struct usb_serial *serial) | 153 | static void cyberjack_disconnect(struct usb_serial *serial) |
152 | { | 154 | { |
153 | int i; | 155 | int i; |
154 | 156 | ||
155 | dbg("%s", __func__); | 157 | dbg("%s", __func__); |
156 | 158 | ||
157 | for (i = 0; i < serial->num_ports; ++i) { | 159 | for (i = 0; i < serial->num_ports; ++i) |
158 | usb_kill_urb(serial->port[i]->interrupt_in_urb); | 160 | usb_kill_urb(serial->port[i]->interrupt_in_urb); |
161 | } | ||
162 | |||
163 | static void cyberjack_release(struct usb_serial *serial) | ||
164 | { | ||
165 | int i; | ||
166 | |||
167 | dbg("%s", __func__); | ||
168 | |||
169 | for (i = 0; i < serial->num_ports; ++i) { | ||
159 | /* My special items, the standard routines free my urbs */ | 170 | /* My special items, the standard routines free my urbs */ |
160 | kfree(usb_get_serial_port_data(serial->port[i])); | 171 | kfree(usb_get_serial_port_data(serial->port[i])); |
161 | usb_set_serial_port_data(serial->port[i], NULL); | ||
162 | } | 172 | } |
163 | } | 173 | } |
164 | 174 | ||