aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial/navman.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/navman.c')
-rw-r--r--drivers/usb/serial/navman.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c
index 7f337c9aeb5..43c8894353b 100644
--- a/drivers/usb/serial/navman.c
+++ b/drivers/usb/serial/navman.c
@@ -6,6 +6,10 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
+ *
+ * TODO:
+ * Add termios method that uses copy_hw but also kills all echo
+ * flags as the navman is rx only so cannot echo.
*/
#include <linux/kernel.h>
@@ -49,15 +53,15 @@ static void navman_read_int_callback(struct urb *urb)
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dbg("%s - urb shutting down with status: %d",
- __FUNCTION__, status);
+ __func__, status);
return;
default:
dbg("%s - nonzero urb status received: %d",
- __FUNCTION__, status);
+ __func__, status);
goto exit;
}
- usb_serial_debug_data(debug, &port->dev, __FUNCTION__,
+ usb_serial_debug_data(debug, &port->dev, __func__,
urb->actual_length, data);
tty = port->tty;
@@ -72,29 +76,29 @@ exit:
if (result)
dev_err(&urb->dev->dev,
"%s - Error %d submitting interrupt urb\n",
- __FUNCTION__, result);
+ __func__, result);
}
static int navman_open(struct usb_serial_port *port, struct file *filp)
{
int result = 0;
- dbg("%s - port %d", __FUNCTION__, port->number);
+ dbg("%s - port %d", __func__, port->number);
if (port->interrupt_in_urb) {
- dbg("%s - adding interrupt input for treo", __FUNCTION__);
+ dbg("%s - adding interrupt input for treo", __func__);
result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
if (result)
dev_err(&port->dev,
"%s - failed submitting interrupt urb, error %d\n",
- __FUNCTION__, result);
+ __func__, result);
}
return result;
}
static void navman_close(struct usb_serial_port *port, struct file *filp)
{
- dbg("%s - port %d", __FUNCTION__, port->number);
+ dbg("%s - port %d", __func__, port->number);
usb_kill_urb(port->interrupt_in_urb);
}
@@ -102,16 +106,12 @@ static void navman_close(struct usb_serial_port *port, struct file *filp)
static int navman_write(struct usb_serial_port *port,
const unsigned char *buf, int count)
{
- dbg("%s - port %d", __FUNCTION__, port->number);
+ dbg("%s - port %d", __func__, port->number);
/*
* This device can't write any data, only read from the device
- * so we just silently eat all data sent to us and say it was
- * successfully sent.
- * Evil, I know, but do you have a better idea?
*/
-
- return count;
+ return -EOPNOTSUPP;
}
static struct usb_serial_driver navman_device = {
@@ -121,9 +121,6 @@ static struct usb_serial_driver navman_device = {
},
.id_table = id_table,
.usb_driver = &navman_driver,
- .num_interrupt_in = NUM_DONT_CARE,
- .num_bulk_in = NUM_DONT_CARE,
- .num_bulk_out = NUM_DONT_CARE,
.num_ports = 1,
.open = navman_open,
.close = navman_close,