Commit 0f16cfe3 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: serial: remove generic disconnect callback

Remove the now empty generic disconnect callback and make the disconnect
callback non-mandatory.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f8f0ad86
...@@ -45,7 +45,6 @@ struct usb_serial_driver usb_serial_generic_device = { ...@@ -45,7 +45,6 @@ struct usb_serial_driver usb_serial_generic_device = {
}, },
.id_table = generic_device_ids, .id_table = generic_device_ids,
.num_ports = 1, .num_ports = 1,
.disconnect = usb_serial_generic_disconnect,
.release = usb_serial_generic_release, .release = usb_serial_generic_release,
.throttle = usb_serial_generic_throttle, .throttle = usb_serial_generic_throttle,
.unthrottle = usb_serial_generic_unthrottle, .unthrottle = usb_serial_generic_unthrottle,
...@@ -500,11 +499,6 @@ int usb_serial_generic_resume(struct usb_serial *serial) ...@@ -500,11 +499,6 @@ int usb_serial_generic_resume(struct usb_serial *serial)
} }
EXPORT_SYMBOL_GPL(usb_serial_generic_resume); EXPORT_SYMBOL_GPL(usb_serial_generic_resume);
void usb_serial_generic_disconnect(struct usb_serial *serial)
{
}
EXPORT_SYMBOL_GPL(usb_serial_generic_disconnect);
void usb_serial_generic_release(struct usb_serial *serial) void usb_serial_generic_release(struct usb_serial *serial)
{ {
} }
...@@ -1095,7 +1095,8 @@ static void usb_serial_disconnect(struct usb_interface *interface) ...@@ -1095,7 +1095,8 @@ static void usb_serial_disconnect(struct usb_interface *interface)
device_del(&port->dev); device_del(&port->dev);
} }
} }
serial->type->disconnect(serial); if (serial->type->disconnect)
serial->type->disconnect(serial);
/* let the last holder of this object cause it to be cleaned up */ /* let the last holder of this object cause it to be cleaned up */
usb_serial_put(serial); usb_serial_put(serial);
...@@ -1304,7 +1305,6 @@ static void fixup_generic(struct usb_serial_driver *device) ...@@ -1304,7 +1305,6 @@ static void fixup_generic(struct usb_serial_driver *device)
set_to_generic_if_null(device, chars_in_buffer); set_to_generic_if_null(device, chars_in_buffer);
set_to_generic_if_null(device, read_bulk_callback); set_to_generic_if_null(device, read_bulk_callback);
set_to_generic_if_null(device, write_bulk_callback); set_to_generic_if_null(device, write_bulk_callback);
set_to_generic_if_null(device, disconnect);
set_to_generic_if_null(device, release); set_to_generic_if_null(device, release);
set_to_generic_if_null(device, process_read_urb); set_to_generic_if_null(device, process_read_urb);
set_to_generic_if_null(device, prepare_write_buffer); set_to_generic_if_null(device, prepare_write_buffer);
......
...@@ -329,7 +329,6 @@ extern void usb_serial_generic_read_bulk_callback(struct urb *urb); ...@@ -329,7 +329,6 @@ extern void usb_serial_generic_read_bulk_callback(struct urb *urb);
extern void usb_serial_generic_write_bulk_callback(struct urb *urb); extern void usb_serial_generic_write_bulk_callback(struct urb *urb);
extern void usb_serial_generic_throttle(struct tty_struct *tty); extern void usb_serial_generic_throttle(struct tty_struct *tty);
extern void usb_serial_generic_unthrottle(struct tty_struct *tty); extern void usb_serial_generic_unthrottle(struct tty_struct *tty);
extern void usb_serial_generic_disconnect(struct usb_serial *serial);
extern void usb_serial_generic_release(struct usb_serial *serial); extern void usb_serial_generic_release(struct usb_serial *serial);
extern int usb_serial_generic_register(void); extern int usb_serial_generic_register(void);
extern void usb_serial_generic_deregister(void); extern void usb_serial_generic_deregister(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment