X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fusb%2Fserial%2Fsafe_serial.c;h=5a03a3fc938693b1056031dd046015d1ce9d6631;hb=5bcd70eba70221ea1ae03fccf1d2903877f9cc5f;hp=897d8447252b522c77c8dc741a02f191d3b2ad38;hpb=ca78f6baca863afe2e6a244a0fe94b3a70211d46;p=powerpc.git diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 897d844725..5a03a3fc93 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c @@ -71,7 +71,7 @@ #include #include #include -#include "usb-serial.h" +#include #ifndef CONFIG_USB_SAFE_PADDED @@ -204,7 +204,7 @@ static __u16 __inline__ fcs_compute10 (unsigned char *sp, int len, __u16 fcs) return fcs; } -static void safe_read_bulk_callback (struct urb *urb, struct pt_regs *regs) +static void safe_read_bulk_callback (struct urb *urb) { struct usb_serial_port *port = (struct usb_serial_port *) urb->context; unsigned char *data = urb->transfer_buffer; @@ -298,14 +298,14 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i dbg ("%s - write request of 0 bytes", __FUNCTION__); return (0); } - spin_lock(&port->lock); + spin_lock_bh(&port->lock); if (port->write_urb_busy) { - spin_unlock(&port->lock); + spin_unlock_bh(&port->lock); dbg("%s - already writing", __FUNCTION__); return 0; } port->write_urb_busy = 1; - spin_unlock(&port->lock); + spin_unlock_bh(&port->lock); packet_length = port->bulk_out_size; // get max packetsize @@ -402,6 +402,7 @@ static struct usb_serial_driver safe_device = { .name = "safe_serial", }, .id_table = id_table, + .usb_driver = &safe_driver, .num_interrupt_in = NUM_DONT_CARE, .num_bulk_in = NUM_DONT_CARE, .num_bulk_out = NUM_DONT_CARE,