X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Fserial%2Fgeneric.c;h=c62cc2876519629a6bd39e8b6284b84a51d201ab;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=21cbaa0fb96b998e99084ac3bc3ed6db1ac2f3dc;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 21cbaa0fb..c62cc2876 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -17,8 +18,8 @@ #include #include #include -#include #include +#include "usb-serial.h" static int debug; @@ -175,14 +176,14 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char * /* only do something if we have a bulk out endpoint */ if (serial->num_bulk_out) { - spin_lock_bh(&port->lock); + spin_lock(&port->lock); if (port->write_urb_busy) { - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); dbg("%s - already writing", __FUNCTION__); return 0; } port->write_urb_busy = 1; - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); count = (count > port->bulk_out_size) ? port->bulk_out_size : count; @@ -285,7 +286,6 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *reg if (result) dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); } -EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { @@ -299,7 +299,9 @@ void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *re return; } - usb_serial_port_softint(port); + usb_serial_port_softint((void *)port); + + schedule_work(&port->work); } EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback);