Commit 28a4b6a6 authored by Aleksey Babahin's avatar Aleksey Babahin Committed by Greg Kroah-Hartman

USB: serial: metro-usb: dummy implement write_int_callback() function.

This function is never called now. Because we don`t send much data
to the device, only one byte via usb_interrupt_msg(). That doesn't require
callback function. But without declaration of write_int_callback inside
the struct usb_serial_driver, the usb_serial_probe doesn't initialize
endpoint address for the interrupt out pipe(interrupt_out_endpointAddress).
This endpoint is necessary for sending data via usb_interrupt_msg()
function.
Signed-off-by: default avatarAleksey Babahin <tamerlan311@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 810ec78e
...@@ -136,6 +136,14 @@ static void metrousb_read_int_callback(struct urb *urb) ...@@ -136,6 +136,14 @@ static void metrousb_read_int_callback(struct urb *urb)
__func__, result); __func__, result);
} }
static void metrousb_write_int_callback(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
dev_warn(&port->dev, "%s not implemented yet.\n",
__func__);
}
static void metrousb_cleanup(struct usb_serial_port *port) static void metrousb_cleanup(struct usb_serial_port *port)
{ {
dev_dbg(&port->dev, "%s\n", __func__); dev_dbg(&port->dev, "%s\n", __func__);
...@@ -377,6 +385,7 @@ static struct usb_serial_driver metrousb_device = { ...@@ -377,6 +385,7 @@ static struct usb_serial_driver metrousb_device = {
.open = metrousb_open, .open = metrousb_open,
.close = metrousb_cleanup, .close = metrousb_cleanup,
.read_int_callback = metrousb_read_int_callback, .read_int_callback = metrousb_read_int_callback,
.write_int_callback = metrousb_write_int_callback,
.attach = metrousb_startup, .attach = metrousb_startup,
.release = metrousb_shutdown, .release = metrousb_shutdown,
.throttle = metrousb_throttle, .throttle = metrousb_throttle,
......
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