Skip to content

Commit

Permalink
[PATCH] USB: Anydata: Fixes wrong URB callback.
Browse files Browse the repository at this point in the history
 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>
  • Loading branch information
Luiz Fernando N. Capitulino authored and Greg Kroah-Hartman committed Jul 12, 2006
1 parent a353678 commit 166ffcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/anydata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/serial/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 166ffcc

Please sign in to comment.