mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
usb: io_ti: Make edge_remove_sysfs_attrs the port_remove method.
commit 6d443d8499 upstream.
Calling edge_remove_sysfs_attrs from edge_disconnect is too late
as the device has already been removed from sysfs.
Do the simple and obvious thing and make edge_remove_sysfs_attrs
the port_remove method.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Wolfgang Frisch <wfpub@roembden.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
06434d3275
commit
74a6015d2b
@@ -2677,15 +2677,7 @@ cleanup:
|
||||
|
||||
static void edge_disconnect(struct usb_serial *serial)
|
||||
{
|
||||
int i;
|
||||
struct edgeport_port *edge_port;
|
||||
|
||||
dbg("%s", __func__);
|
||||
|
||||
for (i = 0; i < serial->num_ports; ++i) {
|
||||
edge_port = usb_get_serial_port_data(serial->port[i]);
|
||||
edge_remove_sysfs_attrs(edge_port->port);
|
||||
}
|
||||
}
|
||||
|
||||
static void edge_release(struct usb_serial *serial)
|
||||
@@ -2764,6 +2756,7 @@ static struct usb_serial_driver edgeport_1port_device = {
|
||||
.disconnect = edge_disconnect,
|
||||
.release = edge_release,
|
||||
.port_probe = edge_create_sysfs_attrs,
|
||||
.port_remove = edge_remove_sysfs_attrs,
|
||||
.ioctl = edge_ioctl,
|
||||
.set_termios = edge_set_termios,
|
||||
.tiocmget = edge_tiocmget,
|
||||
@@ -2795,6 +2788,7 @@ static struct usb_serial_driver edgeport_2port_device = {
|
||||
.disconnect = edge_disconnect,
|
||||
.release = edge_release,
|
||||
.port_probe = edge_create_sysfs_attrs,
|
||||
.port_remove = edge_remove_sysfs_attrs,
|
||||
.ioctl = edge_ioctl,
|
||||
.set_termios = edge_set_termios,
|
||||
.tiocmget = edge_tiocmget,
|
||||
|
||||
Reference in New Issue
Block a user