aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorBreno Leitao <leitao@linux.vnet.ibm.com>2009-04-06 12:34:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-06 17:36:37 -0400
commit60de8ad37436850ac214fe06ecf338da266c2205 (patch)
tree18419595dd3a0fa0b15c9dd2b816cb700088f420 /drivers/serial
parent06e82df015afad2d96d030f76f5e4d13e6dcdfa4 (diff)
icom: remove unused variables
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/icom.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 2b7531d9f6ab..6579e2be1dd1 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -1098,7 +1098,6 @@ static void icom_set_termios(struct uart_port *port,
1098{ 1098{
1099 int baud; 1099 int baud;
1100 unsigned cflag, iflag; 1100 unsigned cflag, iflag;
1101 int bits;
1102 char new_config2; 1101 char new_config2;
1103 char new_config3 = 0; 1102 char new_config3 = 0;
1104 char tmp_byte; 1103 char tmp_byte;
@@ -1119,34 +1118,27 @@ static void icom_set_termios(struct uart_port *port,
1119 switch (cflag & CSIZE) { 1118 switch (cflag & CSIZE) {
1120 case CS5: /* 5 bits/char */ 1119 case CS5: /* 5 bits/char */
1121 new_config2 |= ICOM_ACFG_5BPC; 1120 new_config2 |= ICOM_ACFG_5BPC;
1122 bits = 7;
1123 break; 1121 break;
1124 case CS6: /* 6 bits/char */ 1122 case CS6: /* 6 bits/char */
1125 new_config2 |= ICOM_ACFG_6BPC; 1123 new_config2 |= ICOM_ACFG_6BPC;
1126 bits = 8;
1127 break; 1124 break;
1128 case CS7: /* 7 bits/char */ 1125 case CS7: /* 7 bits/char */
1129 new_config2 |= ICOM_ACFG_7BPC; 1126 new_config2 |= ICOM_ACFG_7BPC;
1130 bits = 9;
1131 break; 1127 break;
1132 case CS8: /* 8 bits/char */ 1128 case CS8: /* 8 bits/char */
1133 new_config2 |= ICOM_ACFG_8BPC; 1129 new_config2 |= ICOM_ACFG_8BPC;
1134 bits = 10;
1135 break; 1130 break;
1136 default: 1131 default:
1137 bits = 10;
1138 break; 1132 break;
1139 } 1133 }
1140 if (cflag & CSTOPB) { 1134 if (cflag & CSTOPB) {
1141 /* 2 stop bits */ 1135 /* 2 stop bits */
1142 new_config2 |= ICOM_ACFG_2STOP_BIT; 1136 new_config2 |= ICOM_ACFG_2STOP_BIT;
1143 bits++;
1144 } 1137 }
1145 if (cflag & PARENB) { 1138 if (cflag & PARENB) {
1146 /* parity bit enabled */ 1139 /* parity bit enabled */
1147 new_config2 |= ICOM_ACFG_PARITY_ENAB; 1140 new_config2 |= ICOM_ACFG_PARITY_ENAB;
1148 trace(ICOM_PORT, "PARENB", 0); 1141 trace(ICOM_PORT, "PARENB", 0);
1149 bits++;
1150 } 1142 }
1151 if (cflag & PARODD) { 1143 if (cflag & PARODD) {
1152 /* odd parity */ 1144 /* odd parity */
@@ -1322,7 +1314,6 @@ static struct uart_driver icom_uart_driver = {
1322static int __devinit icom_init_ports(struct icom_adapter *icom_adapter) 1314static int __devinit icom_init_ports(struct icom_adapter *icom_adapter)
1323{ 1315{
1324 u32 subsystem_id = icom_adapter->subsystem_id; 1316 u32 subsystem_id = icom_adapter->subsystem_id;
1325 int retval = 0;
1326 int i; 1317 int i;
1327 struct icom_port *icom_port; 1318 struct icom_port *icom_port;
1328 1319
@@ -1368,7 +1359,7 @@ static int __devinit icom_init_ports(struct icom_adapter *icom_adapter)
1368 } 1359 }
1369 } 1360 }
1370 1361
1371 return retval; 1362 return 0;
1372} 1363}
1373 1364
1374static void icom_port_active(struct icom_port *icom_port, struct icom_adapter *icom_adapter, int port_num) 1365static void icom_port_active(struct icom_port *icom_port, struct icom_adapter *icom_adapter, int port_num)
@@ -1391,7 +1382,6 @@ static int __devinit icom_load_ports(struct icom_adapter *icom_adapter)
1391{ 1382{
1392 struct icom_port *icom_port; 1383 struct icom_port *icom_port;
1393 int port_num; 1384 int port_num;
1394 int retval;
1395 1385
1396 for (port_num = 0; port_num < icom_adapter->numb_ports; port_num++) { 1386 for (port_num = 0; port_num < icom_adapter->numb_ports; port_num++) {
1397 1387
@@ -1405,7 +1395,7 @@ static int __devinit icom_load_ports(struct icom_adapter *icom_adapter)
1405 icom_port->adapter = icom_adapter; 1395 icom_port->adapter = icom_adapter;
1406 1396
1407 /* get port memory */ 1397 /* get port memory */
1408 if ((retval = get_port_memory(icom_port)) != 0) { 1398 if (get_port_memory(icom_port) != 0) {
1409 dev_err(&icom_port->adapter->pci_dev->dev, 1399 dev_err(&icom_port->adapter->pci_dev->dev,
1410 "Memory allocation for port FAILED\n"); 1400 "Memory allocation for port FAILED\n");
1411 } 1401 }