mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
USB: fix usb-serial regression
This patch reverts d9a7ecacac 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]>
This commit is contained in:
parent
5851fadce8
commit
521b85ae66
1 changed files with 5 additions and 6 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue