aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMathieu OTHACEHE <m.othacehe@gmail.com>2016-07-26 13:59:46 -0400
committerJohan Hovold <johan@kernel.org>2016-08-23 04:12:19 -0400
commit61fc51366b395f1441c7cd3615fb18837a4fa2f8 (patch)
treee4dd17b2065340d8ac81a2fb44bf388ff0167a96 /drivers/usb
parent38d6d23f31a20a6557174d2ab4bdaa0cc713d67c (diff)
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: Mathieu OTHACEHE <m.othacehe@gmail.com> [ johan: drop TI_SET_SERIAL_FLAGS ] Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 5c7b27a04b56..a8b9bdba314f 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -276,9 +276,6 @@ struct ti_firmware_header {
276 276
277#define TI_DEFAULT_CLOSING_WAIT 4000 /* in .01 secs */ 277#define TI_DEFAULT_CLOSING_WAIT 4000 /* in .01 secs */
278 278
279/* supported setserial flags */
280#define TI_SET_SERIAL_FLAGS 0
281
282/* read urb states */ 279/* read urb states */
283#define TI_READ_URB_RUNNING 0 280#define TI_READ_URB_RUNNING 0
284#define TI_READ_URB_STOPPING 1 281#define TI_READ_URB_STOPPING 1
@@ -292,7 +289,6 @@ struct ti_port {
292 u8 tp_shadow_mcr; 289 u8 tp_shadow_mcr;
293 u8 tp_uart_mode; /* 232 or 485 modes */ 290 u8 tp_uart_mode; /* 232 or 485 modes */
294 unsigned int tp_uart_base_addr; 291 unsigned int tp_uart_base_addr;
295 int tp_flags;
296 struct ti_device *tp_tdev; 292 struct ti_device *tp_tdev;
297 struct usb_serial_port *tp_port; 293 struct usb_serial_port *tp_port;
298 spinlock_t tp_lock; 294 spinlock_t tp_lock;
@@ -306,7 +302,6 @@ struct ti_device {
306 struct usb_serial *td_serial; 302 struct usb_serial *td_serial;
307 int td_is_3410; 303 int td_is_3410;
308 bool td_rs485_only; 304 bool td_rs485_only;
309 int td_urb_error;
310}; 305};
311 306
312static int ti_startup(struct usb_serial *serial); 307static int ti_startup(struct usb_serial *serial);
@@ -1157,11 +1152,9 @@ static void ti_interrupt_callback(struct urb *urb)
1157 case -ENOENT: 1152 case -ENOENT:
1158 case -ESHUTDOWN: 1153 case -ESHUTDOWN:
1159 dev_dbg(dev, "%s - urb shutting down, %d\n", __func__, status); 1154 dev_dbg(dev, "%s - urb shutting down, %d\n", __func__, status);
1160 tdev->td_urb_error = 1;
1161 return; 1155 return;
1162 default: 1156 default:
1163 dev_err(dev, "%s - nonzero urb status, %d\n", __func__, status); 1157 dev_err(dev, "%s - nonzero urb status, %d\n", __func__, status);
1164 tdev->td_urb_error = 1;
1165 goto exit; 1158 goto exit;
1166 } 1159 }
1167 1160
@@ -1234,12 +1227,10 @@ static void ti_bulk_in_callback(struct urb *urb)
1234 case -ENOENT: 1227 case -ENOENT:
1235 case -ESHUTDOWN: 1228 case -ESHUTDOWN:
1236 dev_dbg(dev, "%s - urb shutting down, %d\n", __func__, status); 1229 dev_dbg(dev, "%s - urb shutting down, %d\n", __func__, status);
1237 tport->tp_tdev->td_urb_error = 1;
1238 return; 1230 return;
1239 default: 1231 default:
1240 dev_err(dev, "%s - nonzero urb status, %d\n", 1232 dev_err(dev, "%s - nonzero urb status, %d\n",
1241 __func__, status); 1233 __func__, status);
1242 tport->tp_tdev->td_urb_error = 1;
1243 } 1234 }
1244 1235
1245 if (status == -EPIPE) 1236 if (status == -EPIPE)
@@ -1294,12 +1285,10 @@ static void ti_bulk_out_callback(struct urb *urb)
1294 case -ENOENT: 1285 case -ENOENT:
1295 case -ESHUTDOWN: 1286 case -ESHUTDOWN:
1296 dev_dbg(&port->dev, "%s - urb shutting down, %d\n", __func__, status); 1287 dev_dbg(&port->dev, "%s - urb shutting down, %d\n", __func__, status);
1297 tport->tp_tdev->td_urb_error = 1;
1298 return; 1288 return;
1299 default: 1289 default:
1300 dev_err_console(port, "%s - nonzero urb status, %d\n", 1290 dev_err_console(port, "%s - nonzero urb status, %d\n",
1301 __func__, status); 1291 __func__, status);
1302 tport->tp_tdev->td_urb_error = 1;
1303 } 1292 }
1304 1293
1305 /* send any buffered data */ 1294 /* send any buffered data */
@@ -1449,7 +1438,6 @@ static int ti_get_serial_info(struct ti_port *tport,
1449 ret_serial.type = PORT_16550A; 1438 ret_serial.type = PORT_16550A;
1450 ret_serial.line = port->minor; 1439 ret_serial.line = port->minor;
1451 ret_serial.port = port->port_number; 1440 ret_serial.port = port->port_number;
1452 ret_serial.flags = tport->tp_flags;
1453 ret_serial.xmit_fifo_size = kfifo_size(&port->write_fifo); 1441 ret_serial.xmit_fifo_size = kfifo_size(&port->write_fifo);
1454 ret_serial.baud_base = tport->tp_tdev->td_is_3410 ? 921600 : 460800; 1442 ret_serial.baud_base = tport->tp_tdev->td_is_3410 ? 921600 : 460800;
1455 ret_serial.closing_wait = cwait; 1443 ret_serial.closing_wait = cwait;
@@ -1474,7 +1462,6 @@ static int ti_set_serial_info(struct tty_struct *tty, struct ti_port *tport,
1474 if (cwait != ASYNC_CLOSING_WAIT_NONE) 1462 if (cwait != ASYNC_CLOSING_WAIT_NONE)
1475 cwait = msecs_to_jiffies(10 * new_serial.closing_wait); 1463 cwait = msecs_to_jiffies(10 * new_serial.closing_wait);
1476 1464
1477 tport->tp_flags = new_serial.flags & TI_SET_SERIAL_FLAGS;
1478 tport->tp_port->port.closing_wait = cwait; 1465 tport->tp_port->port.closing_wait = cwait;
1479 1466
1480 return 0; 1467 return 0;