Staging: ipack/devices/ipoctal: remove error_flag field from ipoctal struct.

Remove the error_flag field from the ipoctal structure, as the error code
is handled through the tty abstraction. Remove the values definition as well.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Miguel Gómez 2012-06-07 10:24:56 +02:00 committed by Greg Kroah-Hartman
parent 8ae7012d3e
commit c15768bb0c
2 changed files with 0 additions and 21 deletions

View File

@ -50,7 +50,6 @@ struct ipoctal {
unsigned int nb_bytes[NR_CHANNELS]; unsigned int nb_bytes[NR_CHANNELS];
unsigned int count_wr[NR_CHANNELS]; unsigned int count_wr[NR_CHANNELS];
wait_queue_head_t queue[NR_CHANNELS]; wait_queue_head_t queue[NR_CHANNELS];
unsigned short error_flag[NR_CHANNELS];
spinlock_t lock[NR_CHANNELS]; spinlock_t lock[NR_CHANNELS];
unsigned int pointer_read[NR_CHANNELS]; unsigned int pointer_read[NR_CHANNELS];
unsigned int pointer_write[NR_CHANNELS]; unsigned int pointer_write[NR_CHANNELS];
@ -275,23 +274,19 @@ static int ipoctal_irq_handler(void *arg)
CR_CMD_RESET_ERR_STATUS); CR_CMD_RESET_ERR_STATUS);
if (sr & SR_OVERRUN_ERROR) { if (sr & SR_OVERRUN_ERROR) {
ipoctal->error_flag[channel] |= UART_OVERRUN;
ipoctal->chan_stats[channel].overrun_err++; ipoctal->chan_stats[channel].overrun_err++;
/* Overrun doesn't affect the current character*/ /* Overrun doesn't affect the current character*/
tty_insert_flip_char(tty, 0, TTY_OVERRUN); tty_insert_flip_char(tty, 0, TTY_OVERRUN);
} }
if (sr & SR_PARITY_ERROR) { if (sr & SR_PARITY_ERROR) {
ipoctal->error_flag[channel] |= UART_PARITY;
ipoctal->chan_stats[channel].parity_err++; ipoctal->chan_stats[channel].parity_err++;
flag = TTY_PARITY; flag = TTY_PARITY;
} }
if (sr & SR_FRAMING_ERROR) { if (sr & SR_FRAMING_ERROR) {
ipoctal->error_flag[channel] |= UART_FRAMING;
ipoctal->chan_stats[channel].framing_err++; ipoctal->chan_stats[channel].framing_err++;
flag = TTY_FRAME; flag = TTY_FRAME;
} }
if (sr & SR_RECEIVED_BREAK) { if (sr & SR_RECEIVED_BREAK) {
ipoctal->error_flag[channel] |= UART_BREAK;
ipoctal->chan_stats[channel].rcv_break++; ipoctal->chan_stats[channel].rcv_break++;
flag = TTY_BREAK; flag = TTY_BREAK;
} }
@ -493,7 +488,6 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
ipoctal_reset_stats(&ipoctal->chan_stats[i]); ipoctal_reset_stats(&ipoctal->chan_stats[i]);
ipoctal->nb_bytes[i] = 0; ipoctal->nb_bytes[i] = 0;
init_waitqueue_head(&ipoctal->queue[i]); init_waitqueue_head(&ipoctal->queue[i]);
ipoctal->error_flag[i] = UART_NOERROR;
spin_lock_init(&ipoctal->lock[i]); spin_lock_init(&ipoctal->lock[i]);
ipoctal->pointer_read[i] = 0; ipoctal->pointer_read[i] = 0;
@ -552,8 +546,6 @@ static int ipoctal_write(struct ipoctal *ipoctal, unsigned int channel,
ipoctal_copy_write_buffer(ipoctal, channel, buf, count); ipoctal_copy_write_buffer(ipoctal, channel, buf, count);
ipoctal->error_flag[channel] = UART_NOERROR;
/* As the IP-OCTAL 485 only supports half duplex, do it manually */ /* As the IP-OCTAL 485 only supports half duplex, do it manually */
if (ipoctal->board_id == IP_OCTAL_485_ID) { if (ipoctal->board_id == IP_OCTAL_485_ID) {
ipoctal_write_io_reg(ipoctal, ipoctal_write_io_reg(ipoctal,

View File

@ -28,19 +28,6 @@ enum uart_parity_e {
UART_EVEN = 2, UART_EVEN = 2,
}; };
/**
* enum uart_error - UART error type
*
*/
enum uart_error {
UART_NOERROR = 0, /* No error during transmission */
UART_TIMEOUT = 1 << 0, /* Timeout error */
UART_OVERRUN = 1 << 1, /* Overrun error */
UART_PARITY = 1 << 2, /* Parity error */
UART_FRAMING = 1 << 3, /* Framing error */
UART_BREAK = 1 << 4, /* Received break */
};
/** /**
* struct ipoctal_stats -- Stats since last reset * struct ipoctal_stats -- Stats since last reset
* *