From 669e729f9fb4e05ff02dfa01cbb8606549c6cb7c Mon Sep 17 00:00:00 2001 From: David Ward Date: Wed, 16 Sep 2015 12:27:57 -0400 Subject: USB: usb_wwan/option: generalize option_send_setup for other drivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only the option driver implements the send_setup callback; it uses the SET_CONTROL_LINE_STATE request in CDC ACM to generate DTR/RTS signals on the port. This is not driver-specific though and is needed by other drivers, so move the function to the usb_wwan driver (with formatting tweaks), and replace the callback pointer with a flag that enables the request. Suggested-by: Bjørn Mork Suggested-by: Johan Hovold Signed-off-by: David Ward Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-wwan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/serial/usb-wwan.h') diff --git a/drivers/usb/serial/usb-wwan.h b/drivers/usb/serial/usb-wwan.h index f22dff58b587..44b25c08c68a 100644 --- a/drivers/usb/serial/usb-wwan.h +++ b/drivers/usb/serial/usb-wwan.h @@ -34,9 +34,9 @@ extern int usb_wwan_resume(struct usb_serial *serial); struct usb_wwan_intf_private { spinlock_t susp_lock; unsigned int suspended:1; + unsigned int use_send_setup:1; int in_flight; unsigned int open_ports; - int (*send_setup) (struct usb_serial_port *port); void *private; }; -- cgit v1.2.3