diff options
author | Jim Radford <radford@blackbean.org> | 2007-03-13 08:30:50 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-03-19 13:22:18 -0700 |
commit | 521b85ae66ad40a670b27b0596312d347a89b669 (patch) | |
tree | d796e1ffe10c47f0b5eeb3d3aeb8ee24f658ae40 | |
parent | 5851fadce8824d5d4b8fd02c22ae098401f6489e (diff) | |
download | linux-3.10-521b85ae66ad40a670b27b0596312d347a89b669.tar.gz linux-3.10-521b85ae66ad40a670b27b0596312d347a89b669.tar.bz2 linux-3.10-521b85ae66ad40a670b27b0596312d347a89b669.zip |
USB: fix usb-serial regression
This patch reverts d9a7ecacac5f8274d2afce09aadcf37bdb42b93a since it
breaks drivers that need to access the ->port[] array in shutdown
(most of them).
Signed-Off: Jim Radford <radford@blackbean.org>
Acked-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 8511352251f..7639022cdf8 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -138,6 +138,11 @@ static void destroy_serial(struct kref *kref) dbg("%s - %s", __FUNCTION__, serial->type->description); + serial->type->shutdown(serial); + + /* return the minor range that this device had */ + return_serial(serial); + for (i = 0; i < serial->num_ports; ++i) serial->port[i]->open_count = 0; @@ -148,12 +153,6 @@ static void destroy_serial(struct kref *kref) serial->port[i] = NULL; } - if (serial->type->shutdown) - serial->type->shutdown(serial); - - /* return the minor range that this device had */ - return_serial(serial); - /* If this is a "fake" port, we have to clean it up here, as it will * not get cleaned up in port_release() as it was never registered with * the driver core */ |