aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-03-21 07:36:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-25 16:48:26 -0400
commit79b80b8a1141ba0605e917a6fc12d44383ab29b8 (patch)
tree8f9482165cd4dc49b03fb8abd90bd2e6f192d06d
parent0f16cfe39eeef47c91aa3c3bf2b49954d5313a58 (diff)
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: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/serial/generic.c5
-rw-r--r--drivers/usb/serial/usb-serial.c3
-rw-r--r--include/linux/usb/serial.h1
3 files changed, 1 insertions, 8 deletions
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 4d421f3f8a7c..aa71f6e72f61 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -45,7 +45,6 @@ struct usb_serial_driver usb_serial_generic_device = {
45 }, 45 },
46 .id_table = generic_device_ids, 46 .id_table = generic_device_ids,
47 .num_ports = 1, 47 .num_ports = 1,
48 .release = usb_serial_generic_release,
49 .throttle = usb_serial_generic_throttle, 48 .throttle = usb_serial_generic_throttle,
50 .unthrottle = usb_serial_generic_unthrottle, 49 .unthrottle = usb_serial_generic_unthrottle,
51 .resume = usb_serial_generic_resume, 50 .resume = usb_serial_generic_resume,
@@ -498,7 +497,3 @@ int usb_serial_generic_resume(struct usb_serial *serial)
498 return c ? -EIO : 0; 497 return c ? -EIO : 0;
499} 498}
500EXPORT_SYMBOL_GPL(usb_serial_generic_resume); 499EXPORT_SYMBOL_GPL(usb_serial_generic_resume);
501
502void usb_serial_generic_release(struct usb_serial *serial)
503{
504}
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 569b6792c218..4819fd9a639a 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -137,7 +137,7 @@ static void destroy_serial(struct kref *kref)
137 if (serial->minor != SERIAL_TTY_NO_MINOR) 137 if (serial->minor != SERIAL_TTY_NO_MINOR)
138 return_serial(serial); 138 return_serial(serial);
139 139
140 if (serial->attached) 140 if (serial->attached && serial->type->release)
141 serial->type->release(serial); 141 serial->type->release(serial);
142 142
143 /* Now that nothing is using the ports, they can be freed */ 143 /* 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 set_to_generic_if_null(device, chars_in_buffer); 1305 set_to_generic_if_null(device, chars_in_buffer);
1306 set_to_generic_if_null(device, read_bulk_callback); 1306 set_to_generic_if_null(device, read_bulk_callback);
1307 set_to_generic_if_null(device, write_bulk_callback); 1307 set_to_generic_if_null(device, write_bulk_callback);
1308 set_to_generic_if_null(device, release);
1309 set_to_generic_if_null(device, process_read_urb); 1308 set_to_generic_if_null(device, process_read_urb);
1310 set_to_generic_if_null(device, prepare_write_buffer); 1309 set_to_generic_if_null(device, prepare_write_buffer);
1311} 1310}
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 437dfd6787f9..3f8f5e3c76d5 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -329,7 +329,6 @@ extern void usb_serial_generic_read_bulk_callback(struct urb *urb);
329extern void usb_serial_generic_write_bulk_callback(struct urb *urb); 329extern void usb_serial_generic_write_bulk_callback(struct urb *urb);
330extern void usb_serial_generic_throttle(struct tty_struct *tty); 330extern void usb_serial_generic_throttle(struct tty_struct *tty);
331extern void usb_serial_generic_unthrottle(struct tty_struct *tty); 331extern void usb_serial_generic_unthrottle(struct tty_struct *tty);
332extern void usb_serial_generic_release(struct usb_serial *serial);
333extern int usb_serial_generic_register(void); 332extern int usb_serial_generic_register(void);
334extern void usb_serial_generic_deregister(void); 333extern void usb_serial_generic_deregister(void);
335extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, 334extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port,