diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2009-06-02 11:53:55 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:47 -0400 |
commit | f9c99bb8b3a1ec81af68d484a551307326c2e933 (patch) | |
tree | 9031ebe390ecd558d54ad484dde5ba66dcf823b7 /drivers/staging | |
parent | c706ebdfc8955b850e477255a8c0f93f9f14712d (diff) |
USB: usb-serial: replace shutdown with disconnect, release
This patch (as1254) splits up the shutdown method of usb_serial_driver
into a disconnect and a release method.
The problem is that the usb-serial core was calling shutdown during
disconnect handling, but drivers didn't expect it to be called until
after all the open file references had been closed. The result was an
oops when the close method tried to use memory that had been
deallocated by shutdown.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/uc2322/aten2011.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/uc2322/aten2011.c b/drivers/staging/uc2322/aten2011.c index 9c62f787cc9c..39d0926d1a90 100644 --- a/drivers/staging/uc2322/aten2011.c +++ b/drivers/staging/uc2322/aten2011.c | |||
@@ -2336,7 +2336,7 @@ static int ATEN2011_startup(struct usb_serial *serial) | |||
2336 | return 0; | 2336 | return 0; |
2337 | } | 2337 | } |
2338 | 2338 | ||
2339 | static void ATEN2011_shutdown(struct usb_serial *serial) | 2339 | static void ATEN2011_release(struct usb_serial *serial) |
2340 | { | 2340 | { |
2341 | int i; | 2341 | int i; |
2342 | struct ATENINTL_port *ATEN2011_port; | 2342 | struct ATENINTL_port *ATEN2011_port; |
@@ -2382,7 +2382,7 @@ static struct usb_serial_driver aten_serial_driver = { | |||
2382 | .tiocmget = ATEN2011_tiocmget, | 2382 | .tiocmget = ATEN2011_tiocmget, |
2383 | .tiocmset = ATEN2011_tiocmset, | 2383 | .tiocmset = ATEN2011_tiocmset, |
2384 | .attach = ATEN2011_startup, | 2384 | .attach = ATEN2011_startup, |
2385 | .shutdown = ATEN2011_shutdown, | 2385 | .release = ATEN2011_release, |
2386 | .read_bulk_callback = ATEN2011_bulk_in_callback, | 2386 | .read_bulk_callback = ATEN2011_bulk_in_callback, |
2387 | .read_int_callback = ATEN2011_interrupt_callback, | 2387 | .read_int_callback = ATEN2011_interrupt_callback, |
2388 | }; | 2388 | }; |