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>
This commit is contained in:
committed by
Linus Torvalds
parent
06e82df015
commit
60de8ad374
@@ -1098,7 +1098,6 @@ static void icom_set_termios(struct uart_port *port,
|
|||||||
{
|
{
|
||||||
int baud;
|
int baud;
|
||||||
unsigned cflag, iflag;
|
unsigned cflag, iflag;
|
||||||
int bits;
|
|
||||||
char new_config2;
|
char new_config2;
|
||||||
char new_config3 = 0;
|
char new_config3 = 0;
|
||||||
char tmp_byte;
|
char tmp_byte;
|
||||||
@@ -1119,34 +1118,27 @@ static void icom_set_termios(struct uart_port *port,
|
|||||||
switch (cflag & CSIZE) {
|
switch (cflag & CSIZE) {
|
||||||
case CS5: /* 5 bits/char */
|
case CS5: /* 5 bits/char */
|
||||||
new_config2 |= ICOM_ACFG_5BPC;
|
new_config2 |= ICOM_ACFG_5BPC;
|
||||||
bits = 7;
|
|
||||||
break;
|
break;
|
||||||
case CS6: /* 6 bits/char */
|
case CS6: /* 6 bits/char */
|
||||||
new_config2 |= ICOM_ACFG_6BPC;
|
new_config2 |= ICOM_ACFG_6BPC;
|
||||||
bits = 8;
|
|
||||||
break;
|
break;
|
||||||
case CS7: /* 7 bits/char */
|
case CS7: /* 7 bits/char */
|
||||||
new_config2 |= ICOM_ACFG_7BPC;
|
new_config2 |= ICOM_ACFG_7BPC;
|
||||||
bits = 9;
|
|
||||||
break;
|
break;
|
||||||
case CS8: /* 8 bits/char */
|
case CS8: /* 8 bits/char */
|
||||||
new_config2 |= ICOM_ACFG_8BPC;
|
new_config2 |= ICOM_ACFG_8BPC;
|
||||||
bits = 10;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
bits = 10;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (cflag & CSTOPB) {
|
if (cflag & CSTOPB) {
|
||||||
/* 2 stop bits */
|
/* 2 stop bits */
|
||||||
new_config2 |= ICOM_ACFG_2STOP_BIT;
|
new_config2 |= ICOM_ACFG_2STOP_BIT;
|
||||||
bits++;
|
|
||||||
}
|
}
|
||||||
if (cflag & PARENB) {
|
if (cflag & PARENB) {
|
||||||
/* parity bit enabled */
|
/* parity bit enabled */
|
||||||
new_config2 |= ICOM_ACFG_PARITY_ENAB;
|
new_config2 |= ICOM_ACFG_PARITY_ENAB;
|
||||||
trace(ICOM_PORT, "PARENB", 0);
|
trace(ICOM_PORT, "PARENB", 0);
|
||||||
bits++;
|
|
||||||
}
|
}
|
||||||
if (cflag & PARODD) {
|
if (cflag & PARODD) {
|
||||||
/* odd parity */
|
/* odd parity */
|
||||||
@@ -1322,7 +1314,6 @@ static struct uart_driver icom_uart_driver = {
|
|||||||
static int __devinit icom_init_ports(struct icom_adapter *icom_adapter)
|
static int __devinit icom_init_ports(struct icom_adapter *icom_adapter)
|
||||||
{
|
{
|
||||||
u32 subsystem_id = icom_adapter->subsystem_id;
|
u32 subsystem_id = icom_adapter->subsystem_id;
|
||||||
int retval = 0;
|
|
||||||
int i;
|
int i;
|
||||||
struct icom_port *icom_port;
|
struct icom_port *icom_port;
|
||||||
|
|
||||||
@@ -1368,7 +1359,7 @@ static int __devinit icom_init_ports(struct icom_adapter *icom_adapter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icom_port_active(struct icom_port *icom_port, struct icom_adapter *icom_adapter, int port_num)
|
static 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)
|
|||||||
{
|
{
|
||||||
struct icom_port *icom_port;
|
struct icom_port *icom_port;
|
||||||
int port_num;
|
int port_num;
|
||||||
int retval;
|
|
||||||
|
|
||||||
for (port_num = 0; port_num < icom_adapter->numb_ports; port_num++) {
|
for (port_num = 0; port_num < icom_adapter->numb_ports; port_num++) {
|
||||||
|
|
||||||
@@ -1405,7 +1395,7 @@ static int __devinit icom_load_ports(struct icom_adapter *icom_adapter)
|
|||||||
icom_port->adapter = icom_adapter;
|
icom_port->adapter = icom_adapter;
|
||||||
|
|
||||||
/* get port memory */
|
/* get port memory */
|
||||||
if ((retval = get_port_memory(icom_port)) != 0) {
|
if (get_port_memory(icom_port) != 0) {
|
||||||
dev_err(&icom_port->adapter->pci_dev->dev,
|
dev_err(&icom_port->adapter->pci_dev->dev,
|
||||||
"Memory allocation for port FAILED\n");
|
"Memory allocation for port FAILED\n");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user