Skip to content

Commit

Permalink
USB: fix usb-serial regression
Browse files Browse the repository at this point in the history
This patch reverts d9a7eca 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>
  • Loading branch information
Jim Radford authored and Greg Kroah-Hartman committed Mar 19, 2007
1 parent 5851fad commit 521b85a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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 */
Expand Down

0 comments on commit 521b85a

Please sign in to comment.