[PATCH] USB: Anydata: Fixes wrong URB callback.
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Tue, 11 Jul 2006 17:19:25 +0000 (14:19 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 Jul 2006 23:03:25 +0000 (16:03 -0700)
 Anydata is using usb_serial_generic_write_bulk_callback() for its
read URB, but it should use usb_serial_generic_read_bulk_callback()
instead (it's a read URB, isn't it?).

 Reported by Jon K Hellan <hellan@acm.org>.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/anydata.c
drivers/usb/serial/generic.c

index 343f6f22822043c954cdeca1915d0b746152049a..dadf2838f9429ce99af0c8b27a9ba94825f984e4 100644 (file)
@@ -71,7 +71,7 @@ static int anydata_open(struct usb_serial_port *port, struct file *filp)
                                          port->bulk_in_endpointAddress),
                          port->read_urb->transfer_buffer,
                          port->read_urb->transfer_buffer_length,
-                         usb_serial_generic_write_bulk_callback, port);
+                         usb_serial_generic_read_bulk_callback, port);
        result = usb_submit_urb(port->read_urb, GFP_KERNEL);
        if (result)
                dev_err(&port->dev,
index 945b8bb38c92ec4f422d645644dca8adfff292fd..99872e13ba2dcc50f0f5a00f302197c0b6d8ac30 100644 (file)
@@ -285,6 +285,7 @@ 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)
 {