diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2009-07-07 09:50:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-12 18:16:40 -0400 |
commit | 7bae0a070db4bc2761dd9515f450cdfa3f3f248c (patch) | |
tree | f4a90527a00889de6793b321d1261bd375278d7f /drivers/usb/serial | |
parent | c3325eb16d36a49f9a5ae09241c418cfd1d3f4f5 (diff) |
USB: Sierra: fix oops upon device close
This patch (as1263) fixes a mixup that occurred when conflicting
patches for the sierra driver were merged incorrectly. The former
sierra_shutdown routine should have been become sierra_release, not
sierra_disconnect.
The symptom this fixes is an oops when the device file is closed after
a Sierra device has been unplugged (Bugzilla #13675).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Peter Naulls <peter@mushroomnetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/sierra.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 032f7aeb40a4..5062815baed0 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -814,7 +814,7 @@ static int sierra_startup(struct usb_serial *serial) | |||
814 | return 0; | 814 | return 0; |
815 | } | 815 | } |
816 | 816 | ||
817 | static void sierra_disconnect(struct usb_serial *serial) | 817 | static void sierra_release(struct usb_serial *serial) |
818 | { | 818 | { |
819 | int i; | 819 | int i; |
820 | struct usb_serial_port *port; | 820 | struct usb_serial_port *port; |
@@ -830,7 +830,6 @@ static void sierra_disconnect(struct usb_serial *serial) | |||
830 | if (!portdata) | 830 | if (!portdata) |
831 | continue; | 831 | continue; |
832 | kfree(portdata); | 832 | kfree(portdata); |
833 | usb_set_serial_port_data(port, NULL); | ||
834 | } | 833 | } |
835 | } | 834 | } |
836 | 835 | ||
@@ -853,7 +852,7 @@ static struct usb_serial_driver sierra_device = { | |||
853 | .tiocmget = sierra_tiocmget, | 852 | .tiocmget = sierra_tiocmget, |
854 | .tiocmset = sierra_tiocmset, | 853 | .tiocmset = sierra_tiocmset, |
855 | .attach = sierra_startup, | 854 | .attach = sierra_startup, |
856 | .disconnect = sierra_disconnect, | 855 | .release = sierra_release, |
857 | .read_int_callback = sierra_instat_callback, | 856 | .read_int_callback = sierra_instat_callback, |
858 | }; | 857 | }; |
859 | 858 | ||