mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Miguel Gómez" <magomez@igalia.com>
To: gregkh@linuxfoundation.org, siglesias@igalia.com,
	dan.carpenter@oracle.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	"Miguel Gómez" <magomez@igalia.com>
Subject: [PATCH 7/9] Staging: ipack/devices/ipoctal: remove error_flag field from ipoctal struct.
Date: Thu,  7 Jun 2012 10:24:56 +0200	[thread overview]
Message-ID: <1339057498-5256-7-git-send-email-magomez@igalia.com> (raw)
In-Reply-To: <1339057498-5256-1-git-send-email-magomez@igalia.com>

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>
---
 drivers/staging/ipack/devices/ipoctal.c |    8 --------
 drivers/staging/ipack/devices/ipoctal.h |   13 -------------
 2 files changed, 21 deletions(-)

diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging/ipack/devices/ipoctal.c
index ff88800..2921467 100644
--- a/drivers/staging/ipack/devices/ipoctal.c
+++ b/drivers/staging/ipack/devices/ipoctal.c
@@ -50,7 +50,6 @@ struct ipoctal {
 	unsigned int			nb_bytes[NR_CHANNELS];
 	unsigned int			count_wr[NR_CHANNELS];
 	wait_queue_head_t		queue[NR_CHANNELS];
-	unsigned short			error_flag[NR_CHANNELS];
 	spinlock_t			lock[NR_CHANNELS];
 	unsigned int			pointer_read[NR_CHANNELS];
 	unsigned int			pointer_write[NR_CHANNELS];
@@ -275,23 +274,19 @@ static int ipoctal_irq_handler(void *arg)
 						     CR_CMD_RESET_ERR_STATUS);
 
 				if (sr & SR_OVERRUN_ERROR) {
-					ipoctal->error_flag[channel] |= UART_OVERRUN;
 					ipoctal->chan_stats[channel].overrun_err++;
 					/* Overrun doesn't affect the current character*/
 					tty_insert_flip_char(tty, 0, TTY_OVERRUN);
 				}
 				if (sr & SR_PARITY_ERROR) {
-					ipoctal->error_flag[channel] |= UART_PARITY;
 					ipoctal->chan_stats[channel].parity_err++;
 					flag = TTY_PARITY;
 				}
 				if (sr & SR_FRAMING_ERROR) {
-					ipoctal->error_flag[channel] |= UART_FRAMING;
 					ipoctal->chan_stats[channel].framing_err++;
 					flag = TTY_FRAME;
 				}
 				if (sr & SR_RECEIVED_BREAK) {
-					ipoctal->error_flag[channel] |= UART_BREAK;
 					ipoctal->chan_stats[channel].rcv_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->nb_bytes[i] = 0;
 		init_waitqueue_head(&ipoctal->queue[i]);
-		ipoctal->error_flag[i] = UART_NOERROR;
 
 		spin_lock_init(&ipoctal->lock[i]);
 		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->error_flag[channel] = UART_NOERROR;
-
 	/* As the IP-OCTAL 485 only supports half duplex, do it manually */
 	if (ipoctal->board_id == IP_OCTAL_485_ID) {
 		ipoctal_write_io_reg(ipoctal,
diff --git a/drivers/staging/ipack/devices/ipoctal.h b/drivers/staging/ipack/devices/ipoctal.h
index b3c901c..2aae170 100644
--- a/drivers/staging/ipack/devices/ipoctal.h
+++ b/drivers/staging/ipack/devices/ipoctal.h
@@ -29,19 +29,6 @@ enum uart_parity_e {
 };
 
 /**
- * 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
  *
  * @tx: Number of transmitted bytes
-- 
1.7.9.5


  parent reply	other threads:[~2012-06-07  8:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07  8:24 [PATCH 1/9] Staging: ipack/bridges/tpci200: remove gotos in tpci200_free_irq() Miguel Gómez
2012-06-07  8:24 ` [PATCH 2/9] Staging: ipack/bridges/tpci200: remove "out" label in tpci200_slot_map_space() Miguel Gómez
2012-06-07  8:24 ` [PATCH 3/9] Staging: ipack/bridges/tpci200: remove useless break " Miguel Gómez
2012-06-07  8:24 ` [PATCH 4/9] Staging: ipack/bridges/tpci200: remove "out" label in tpci200_request_irq() Miguel Gómez
2012-06-07  8:24 ` [PATCH 5/9] Staging: ipack/bridges/tpci200: remove gotos in tpci200_install() Miguel Gómez
2012-06-07  8:24 ` [PATCH 6/9] Staging: ipack/devices/ipoctal: remove ipoctal_config structure Miguel Gómez
2012-06-07  8:24 ` Miguel Gómez [this message]
2012-06-07  8:24 ` [PATCH 8/9] Staging: ipack/devices/ipoctal: remove unused enum uart_parity_e Miguel Gómez
2012-06-07  8:24 ` [PATCH 9/9] Staging: ipack/bridges/tpci200: change device table definition and export it Miguel Gómez
2012-06-07  8:39 ` [PATCH 1/9] Staging: ipack/bridges/tpci200: remove gotos in tpci200_free_irq() Dan Carpenter
2012-06-07  9:10 ` [PATCH v2 " Miguel Gómez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1339057498-5256-7-git-send-email-magomez@igalia.com \
    --to=magomez@igalia.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=siglesias@igalia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®