提交 521b85ae 编写于 作者: J Jim Radford 提交者: Greg Kroah-Hartman

USB: fix usb-serial regression

This patch reverts d9a7ecac 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: NMark Lord <mlord@pobox.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 5851fadc
...@@ -138,6 +138,11 @@ static void destroy_serial(struct kref *kref) ...@@ -138,6 +138,11 @@ static void destroy_serial(struct kref *kref)
dbg("%s - %s", __FUNCTION__, serial->type->description); 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) for (i = 0; i < serial->num_ports; ++i)
serial->port[i]->open_count = 0; serial->port[i]->open_count = 0;
...@@ -148,12 +153,6 @@ static void destroy_serial(struct kref *kref) ...@@ -148,12 +153,6 @@ static void destroy_serial(struct kref *kref)
serial->port[i] = NULL; 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 /* 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 * not get cleaned up in port_release() as it was never registered with
* the driver core */ * the driver core */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册