Commit 61fc5136 authored by Mathieu OTHACEHE's avatar Mathieu OTHACEHE Committed by Johan Hovold

USB: serial: ti_usb_3410_5052: remove unused variables

Remove variables affected but never read.

Also drop the now unused TI_SET_SERIAL_FLAGS define.
Signed-off-by: default avatarMathieu OTHACEHE <m.othacehe@gmail.com>
[ johan: drop TI_SET_SERIAL_FLAGS ]
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 38d6d23f
...@@ -276,9 +276,6 @@ struct ti_firmware_header { ...@@ -276,9 +276,6 @@ struct ti_firmware_header {
#define TI_DEFAULT_CLOSING_WAIT 4000 /* in .01 secs */ #define TI_DEFAULT_CLOSING_WAIT 4000 /* in .01 secs */
/* supported setserial flags */
#define TI_SET_SERIAL_FLAGS 0
/* read urb states */ /* read urb states */
#define TI_READ_URB_RUNNING 0 #define TI_READ_URB_RUNNING 0
#define TI_READ_URB_STOPPING 1 #define TI_READ_URB_STOPPING 1
...@@ -292,7 +289,6 @@ struct ti_port { ...@@ -292,7 +289,6 @@ struct ti_port {
u8 tp_shadow_mcr; u8 tp_shadow_mcr;
u8 tp_uart_mode; /* 232 or 485 modes */ u8 tp_uart_mode; /* 232 or 485 modes */
unsigned int tp_uart_base_addr; unsigned int tp_uart_base_addr;
int tp_flags;
struct ti_device *tp_tdev; struct ti_device *tp_tdev;
struct usb_serial_port *tp_port; struct usb_serial_port *tp_port;
spinlock_t tp_lock; spinlock_t tp_lock;
...@@ -306,7 +302,6 @@ struct ti_device { ...@@ -306,7 +302,6 @@ struct ti_device {
struct usb_serial *td_serial; struct usb_serial *td_serial;
int td_is_3410; int td_is_3410;
bool td_rs485_only; bool td_rs485_only;
int td_urb_error;
}; };
static int ti_startup(struct usb_serial *serial); static int ti_startup(struct usb_serial *serial);
...@@ -1157,11 +1152,9 @@ static void ti_interrupt_callback(struct urb *urb) ...@@ -1157,11 +1152,9 @@ static void ti_interrupt_callback(struct urb *urb)
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
dev_dbg(dev, "%s - urb shutting down, %d\n", __func__, status); dev_dbg(dev, "%s - urb shutting down, %d\n", __func__, status);
tdev->td_urb_error = 1;
return; return;
default: default:
dev_err(dev, "%s - nonzero urb status, %d\n", __func__, status); dev_err(dev, "%s - nonzero urb status, %d\n", __func__, status);
tdev->td_urb_error = 1;
goto exit; goto exit;
} }
...@@ -1234,12 +1227,10 @@ static void ti_bulk_in_callback(struct urb *urb) ...@@ -1234,12 +1227,10 @@ static void ti_bulk_in_callback(struct urb *urb)
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
dev_dbg(dev, "%s - urb shutting down, %d\n", __func__, status); dev_dbg(dev, "%s - urb shutting down, %d\n", __func__, status);
tport->tp_tdev->td_urb_error = 1;
return; return;
default: default:
dev_err(dev, "%s - nonzero urb status, %d\n", dev_err(dev, "%s - nonzero urb status, %d\n",
__func__, status); __func__, status);
tport->tp_tdev->td_urb_error = 1;
} }
if (status == -EPIPE) if (status == -EPIPE)
...@@ -1294,12 +1285,10 @@ static void ti_bulk_out_callback(struct urb *urb) ...@@ -1294,12 +1285,10 @@ static void ti_bulk_out_callback(struct urb *urb)
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
dev_dbg(&port->dev, "%s - urb shutting down, %d\n", __func__, status); dev_dbg(&port->dev, "%s - urb shutting down, %d\n", __func__, status);
tport->tp_tdev->td_urb_error = 1;
return; return;
default: default:
dev_err_console(port, "%s - nonzero urb status, %d\n", dev_err_console(port, "%s - nonzero urb status, %d\n",
__func__, status); __func__, status);
tport->tp_tdev->td_urb_error = 1;
} }
/* send any buffered data */ /* send any buffered data */
...@@ -1449,7 +1438,6 @@ static int ti_get_serial_info(struct ti_port *tport, ...@@ -1449,7 +1438,6 @@ static int ti_get_serial_info(struct ti_port *tport,
ret_serial.type = PORT_16550A; ret_serial.type = PORT_16550A;
ret_serial.line = port->minor; ret_serial.line = port->minor;
ret_serial.port = port->port_number; ret_serial.port = port->port_number;
ret_serial.flags = tport->tp_flags;
ret_serial.xmit_fifo_size = kfifo_size(&port->write_fifo); ret_serial.xmit_fifo_size = kfifo_size(&port->write_fifo);
ret_serial.baud_base = tport->tp_tdev->td_is_3410 ? 921600 : 460800; ret_serial.baud_base = tport->tp_tdev->td_is_3410 ? 921600 : 460800;
ret_serial.closing_wait = cwait; ret_serial.closing_wait = cwait;
...@@ -1474,7 +1462,6 @@ static int ti_set_serial_info(struct tty_struct *tty, struct ti_port *tport, ...@@ -1474,7 +1462,6 @@ static int ti_set_serial_info(struct tty_struct *tty, struct ti_port *tport,
if (cwait != ASYNC_CLOSING_WAIT_NONE) if (cwait != ASYNC_CLOSING_WAIT_NONE)
cwait = msecs_to_jiffies(10 * new_serial.closing_wait); cwait = msecs_to_jiffies(10 * new_serial.closing_wait);
tport->tp_flags = new_serial.flags & TI_SET_SERIAL_FLAGS;
tport->tp_port->port.closing_wait = cwait; tport->tp_port->port.closing_wait = cwait;
return 0; return 0;
......
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