Skip to contentSkip to conversation

jsm: cleaning up structures

PATCH New Breno Leitao 1 participant 6 messages Sep 29, 2009

lore
Share & tools
lore
#0 lore raw

cover jsm: cleaning up structures

A serie of patches that clean the jsm structures. There are a lot of fields there that were never used, and is now being removed

Breno Leitao (5):
jsm: remove the ch_custom_speed field
jsm: removing ch_old_baud field
jsm: Remove ch_cpstime field
jsm: Removing unused jsm_channel->ch_wopen field
jsm: removing the field jsm_board->intr_count

 drivers/serial/jsm/jsm.h     |    8 --------
 drivers/serial/jsm/jsm_neo.c |    8 --------
 drivers/serial/jsm/jsm_tty.c |    2 --
 3 files changed, 0 insertions(+), 18 deletions(-)
#1 lore raw

PATCH 1/5 jsm: remove the ch_custom_speed field

Currently the ch_custom_speed field exists but is never used, so, this patch removes it.

---
 drivers/serial/jsm/jsm.h     |    1 -
 drivers/serial/jsm/jsm_neo.c |    4 ----
 2 files changed, 0 insertions(+), 5 deletions(-)
drivers/serial/jsm/jsm.h +0 -1
index 4e5f3bd..afcbee2 100644
@@ -216,7 +216,6 @@ struct jsm_channel {
 	u8		ch_startc;	/* Start character		*/
 
 	u32		ch_old_baud;	/* Cache of the current baud */
-	u32		ch_custom_speed;/* Custom baud, if set */
 
 	u32		ch_wopen;	/* Waiting for open process cnt */
 
drivers/serial/jsm/jsm_neo.c +0 -4
index b4b124e..088e702 100644
@@ -957,10 +957,6 @@ static void neo_param(struct jsm_channel *ch)
 		ch->ch_old_baud = 0;
 		return;
 
-	} else if (ch->ch_custom_speed) {
-			baud = ch->ch_custom_speed;
-			if (ch->ch_flags & CH_BAUD0)
-				ch->ch_flags &= ~(CH_BAUD0);
 	} else {
 		int i;
 		unsigned int cflag;
Signature · 1 line
1.6.0.4
#2 lore raw

PATCH 2/5 jsm: removing ch_old_baud field

In reply to Breno Leitao

Currently the field jsm_channel->ch_old_baud is not used, just assigned in a lot of places but never used. This patches removes this field.

---
 drivers/serial/jsm/jsm.h     |    2 --
 drivers/serial/jsm/jsm_neo.c |    2 --
 drivers/serial/jsm/jsm_tty.c |    2 --
 3 files changed, 0 insertions(+), 6 deletions(-)
drivers/serial/jsm/jsm.h +0 -2
index afcbee2..d413e4a 100644
@@ -215,8 +215,6 @@ struct jsm_channel {
 	u8		ch_stopc;	/* Stop character		*/
 	u8		ch_startc;	/* Start character		*/
 
-	u32		ch_old_baud;	/* Cache of the current baud */
-
 	u32		ch_wopen;	/* Waiting for open process cnt */
 
 	u8		ch_mostat;	/* FEP output modem status	*/
drivers/serial/jsm/jsm_neo.c +0 -2
index 088e702..bee3727 100644
@@ -954,7 +954,6 @@ static void neo_param(struct jsm_channel *ch)
 		ch->ch_flags |= (CH_BAUD0);
 		ch->ch_mostat &= ~(UART_MCR_RTS | UART_MCR_DTR);
 		neo_assert_modem_signals(ch);
-		ch->ch_old_baud = 0;
 		return;
 
 	} else {
@@ -1041,7 +1040,6 @@ static void neo_param(struct jsm_channel *ch)
 	quot = ch->ch_bd->bd_dividend / baud;
 
 	if (quot != 0) {
-		ch->ch_old_baud = baud;
 		writeb(UART_LCR_DLAB, &ch->ch_neo_uart->lcr);
 		writeb((quot & 0xff), &ch->ch_neo_uart->txrx);
 		writeb((quot >> 8), &ch->ch_neo_uart->ier);
drivers/serial/jsm/jsm_tty.c +0 -2
index 6423dfb..1bcad59 100644
@@ -296,8 +296,6 @@ static void jsm_tty_close(struct uart_port *port)
 		bd->bd_ops->assert_modem_signals(channel);
 	}
 
-	channel->ch_old_baud = 0;
-
 	/* Turn off UART interrupts for this port */
 	channel->ch_bd->bd_ops->uart_off(channel);
 
Signature · 1 line
1.6.0.4
#3 lore raw

PATCH 3/5 jsm: Remove ch_cpstime field

In reply to Breno Leitao

Currently the field jsm_channel->ch_cpstime is defined but never used, so this patch removes it.

---
 drivers/serial/jsm/jsm.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/serial/jsm/jsm.h +0 -2
index d413e4a..8c14351 100644
@@ -206,8 +206,6 @@ struct jsm_channel {
 
 	u64		ch_close_delay;	/* How long we should drop RTS/DTR for */
 
-	u64		ch_cpstime;	/* Time for CPS calculations	*/
-
 	tcflag_t	ch_c_iflag;	/* channel iflags		*/
 	tcflag_t	ch_c_cflag;	/* channel cflags		*/
 	tcflag_t	ch_c_oflag;	/* channel oflags		*/
Signature · 1 line
1.6.0.4
#4 lore raw

PATCH 4/5 jsm: Removing unused jsm_channel->ch_wopen field

In reply to Breno Leitao

Currently the jsm_channel->ch_wopen field is defined and never used. So, this patch removes it.

---
 drivers/serial/jsm/jsm.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/serial/jsm/jsm.h +0 -2
index 8c14351..484c927 100644
@@ -213,8 +213,6 @@ struct jsm_channel {
 	u8		ch_stopc;	/* Stop character		*/
 	u8		ch_startc;	/* Start character		*/
 
-	u32		ch_wopen;	/* Waiting for open process cnt */
-
 	u8		ch_mostat;	/* FEP output modem status	*/
 	u8		ch_mistat;	/* FEP input modem status	*/
 
Signature · 1 line
1.6.0.4
#5 lore raw

PATCH 5/5 jsm: removing the field jsm_board->intr_count

In reply to Breno Leitao

Currently there is a field in the jsm_board structure to cont the number of interrupt that the card recevived, but it's not working properly when the IRQ line is shared, and also nowhere else this field is used. So, This patch is removing it.

---
 drivers/serial/jsm/jsm.h     |    1 -
 drivers/serial/jsm/jsm_neo.c |    2 --
 2 files changed, 0 insertions(+), 3 deletions(-)
drivers/serial/jsm/jsm.h +0 -1
index 484c927..38a509c 100644
@@ -138,7 +138,6 @@ struct jsm_board
 	u32		nasync;		/* Number of ports on card */
 
 	u32		irq;		/* Interrupt request number */
-	u64		intr_count;	/* Count of interrupts */
 
 	u64		membase;	/* Start of base memory of the card */
 	u64		membase_end;	/* End of base memory of the card */
drivers/serial/jsm/jsm_neo.c +0 -2
index bee3727..7960d96 100644
@@ -1117,8 +1117,6 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
 	unsigned long lock_flags2;
 	int outofloop_count = 0;
 
-	brd->intr_count++;
-
 	/* Lock out the slow poller from running on this board. */
 	spin_lock_irqsave(&brd->bd_intr_lock, lock_flags);
 
Signature · 1 line
1.6.0.4