Commit e185597b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: made port_softint global for other usb-serial drivers to use.

Based off of a patch from Stuart MacDonald <stuartm@connecttech.com>
parent 9a50ad7f
...@@ -232,6 +232,7 @@ struct usb_serial_device_type { ...@@ -232,6 +232,7 @@ struct usb_serial_device_type {
extern int usb_serial_register(struct usb_serial_device_type *new_device); extern int usb_serial_register(struct usb_serial_device_type *new_device);
extern void usb_serial_deregister(struct usb_serial_device_type *device); extern void usb_serial_deregister(struct usb_serial_device_type *device);
extern void usb_serial_port_softint(void *private);
extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id);
extern void usb_serial_disconnect(struct usb_interface *iface); extern void usb_serial_disconnect(struct usb_interface *iface);
......
...@@ -1090,6 +1090,8 @@ static void generic_write_bulk_callback (struct urb *urb) ...@@ -1090,6 +1090,8 @@ static void generic_write_bulk_callback (struct urb *urb)
return; return;
} }
usb_serial_port_softint((void *)port);
queue_task(&port->tqueue, &tq_immediate); queue_task(&port->tqueue, &tq_immediate);
mark_bh(IMMEDIATE_BH); mark_bh(IMMEDIATE_BH);
...@@ -1108,14 +1110,18 @@ static void generic_shutdown (struct usb_serial *serial) ...@@ -1108,14 +1110,18 @@ static void generic_shutdown (struct usb_serial *serial)
} }
} }
static void port_softint(void *private) void usb_serial_port_softint(void *private)
{ {
struct usb_serial_port *port = (struct usb_serial_port *)private; struct usb_serial_port *port = (struct usb_serial_port *)private;
struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); struct usb_serial *serial;
struct tty_struct *tty; struct tty_struct *tty;
dbg("%s - port %d", __FUNCTION__, port->number); dbg("%s - port %d", __FUNCTION__, port->number);
if (!port)
return;
serial = get_usb_serial (port, __FUNCTION__);
if (!serial) if (!serial)
return; return;
...@@ -1399,7 +1405,7 @@ int usb_serial_probe(struct usb_interface *interface, ...@@ -1399,7 +1405,7 @@ int usb_serial_probe(struct usb_interface *interface,
port->number = i + serial->minor; port->number = i + serial->minor;
port->serial = serial; port->serial = serial;
port->magic = USB_SERIAL_PORT_MAGIC; port->magic = USB_SERIAL_PORT_MAGIC;
port->tqueue.routine = port_softint; port->tqueue.routine = usb_serial_port_softint;
port->tqueue.data = port; port->tqueue.data = port;
init_MUTEX (&port->sem); init_MUTEX (&port->sem);
} }
...@@ -1689,6 +1695,7 @@ EXPORT_SYMBOL(usb_serial_register); ...@@ -1689,6 +1695,7 @@ EXPORT_SYMBOL(usb_serial_register);
EXPORT_SYMBOL(usb_serial_deregister); EXPORT_SYMBOL(usb_serial_deregister);
EXPORT_SYMBOL(usb_serial_probe); EXPORT_SYMBOL(usb_serial_probe);
EXPORT_SYMBOL(usb_serial_disconnect); EXPORT_SYMBOL(usb_serial_disconnect);
EXPORT_SYMBOL(usb_serial_port_softint);
#ifdef USES_EZUSB_FUNCTIONS #ifdef USES_EZUSB_FUNCTIONS
EXPORT_SYMBOL(ezusb_writememory); EXPORT_SYMBOL(ezusb_writememory);
EXPORT_SYMBOL(ezusb_set_reset); EXPORT_SYMBOL(ezusb_set_reset);
......
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