Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=521b85ae66ad40a670b27b0596312d347a89b669
Commit:     521b85ae66ad40a670b27b0596312d347a89b669
Parent:     5851fadce8824d5d4b8fd02c22ae098401f6489e
Author:     Jim Radford <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 13 08:30:50 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Mon Mar 19 13:22:18 2007 -0700

    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 <[EMAIL PROTECTED]>
    Acked-by: Mark Lord <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 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 8511352..7639022 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 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to