Commit 79b80b8a authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: serial: remove generic release callback

Remove empty generic release implementation and make the release
callback non-mandatory (like attach, probe and disconnect).
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0f16cfe3
...@@ -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,
.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,
.resume = usb_serial_generic_resume, .resume = usb_serial_generic_resume,
...@@ -498,7 +497,3 @@ int usb_serial_generic_resume(struct usb_serial *serial) ...@@ -498,7 +497,3 @@ int usb_serial_generic_resume(struct usb_serial *serial)
return c ? -EIO : 0; return c ? -EIO : 0;
} }
EXPORT_SYMBOL_GPL(usb_serial_generic_resume); EXPORT_SYMBOL_GPL(usb_serial_generic_resume);
void usb_serial_generic_release(struct usb_serial *serial)
{
}
...@@ -137,7 +137,7 @@ static void destroy_serial(struct kref *kref) ...@@ -137,7 +137,7 @@ static void destroy_serial(struct kref *kref)
if (serial->minor != SERIAL_TTY_NO_MINOR) if (serial->minor != SERIAL_TTY_NO_MINOR)
return_serial(serial); return_serial(serial);
if (serial->attached) if (serial->attached && serial->type->release)
serial->type->release(serial); serial->type->release(serial);
/* Now that nothing is using the ports, they can be freed */ /* Now that nothing is using the ports, they can be freed */
...@@ -1305,7 +1305,6 @@ static void fixup_generic(struct usb_serial_driver *device) ...@@ -1305,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, 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_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);
extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port,
......
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