login
Header Space

 
 

[RFC 1/13] Char: nozomi, remove unneded stuff

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: Frank Seidel <fseidel@...>
Date: Friday, November 9, 2007 - 7:43 pm

Frank, could you comment (and test) following changes to the nozomi driver?
I did them before you post the updated version and rediffed them a while
ago, I hope I haven't done any mistake while doing it.

Thanks.

--

nozomi, remove unneded stuff

- tty_termios* are set to tty struct, but tty_register_driver overwrites it
  with its own values (or NULLs), no need to have these pointers stored
- [rt]x_data are updated but never used

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

---
commit 79aeb51662902086507927cb7fcd682ae319630a
tree 157e1fcc2b57542d831bcb80a6328edbfe6ed231
parent 9d50b0aba24ca0b601820663939987990db134c6
author Jiri Slaby <jirislaby@gmail.com> Mon, 29 Oct 2007 11:01:49 +0100
committer Jiri Slaby <jirislaby@gmail.com> Fri, 09 Nov 2007 22:52:10 +0100

 drivers/char/nozomi.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c
index 93b48b4..458e70b 100644
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -412,8 +412,6 @@ struct port {
 	wait_queue_head_t tty_wait;
 	struct async_icount tty_icount;
 	int tty_index;
-	u32 rx_data, tx_data;
-
 };
 
 /* Private data one for each card in the system */
@@ -435,8 +433,6 @@ struct nozomi {
 
 	struct tty_driver *tty_driver;
 
-	struct ktermios *tty_termios[NTTY_TTY_MINORS];
-	struct ktermios *tty_termios_locked[NTTY_TTY_MINORS];
 	spinlock_t spin_mutex;	/* secures access to registers and tty */
 
 	u32 open_ttys;
@@ -1012,8 +1008,6 @@ static int send_data(enum port_type index, struct nozomi *dc)
 		return 0;
 	}
 
-	port->tx_data += size;
-
 	/* DUMP(buf, size); */
 
 	/* Write length + data */
@@ -1059,8 +1053,6 @@ static int receive_data(enum port_type index, struct nozomi *dc)
 		return 1;
 	}
 
-	port->rx_data += size;
-
 	tty_buffer_request_room(tty, size);
 
 	while (size > 0) {
@@ -1517,7 +1509,6 @@ static void nozomi_get_card_type(struct nozomi *dc)
 static void nozomi_setup_private_data(struct nozomi *dc)
 {
 	void __iomem *offset = dc->base_addr + dc->card_type / 2;
-	int i;
 
 	dc->reg_fcr = (void __iomem *)(offset + R_FCR);
 	dc->reg_iir = (void __iomem *)(offset + R_IIR);
@@ -1529,11 +1520,6 @@ static void nozomi_setup_private_data(struct nozomi *dc)
 	dc->port[PORT_DIAG].token_dl = DIAG_DL;
 	dc->port[PORT_APP1].token_dl = APP1_DL;
 	dc->port[PORT_APP2].token_dl = APP2_DL;
-
-	for (i = PORT_MDM; i < MAX_PORT; ++i) {
-		dc->port[i].rx_data = 0;
-		dc->port[i].tx_data = 0;
-	}
 }
 
 static ssize_t card_type_show(struct device *dev, struct device_attribute *attr,
@@ -1871,8 +1857,6 @@ static int ntty_open(struct tty_struct *tty, struct file *file)
 		tty->driver_data = port;
 		port->tty = tty;
 		port->tty_index = tty->index;
-		port->rx_data = 0;
-		port->tx_data = 0;
 		DBG1("open: %d", port->token_dl);
 		spin_lock_irqsave(&dc->spin_mutex, flags);
 		dc->last_ier =
@@ -2239,8 +2223,6 @@ static int ntty_tty_init(struct nozomi *dc)
 	td->init_termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL;
 	td->init_termios.c_ispeed = 115200;
 	td->init_termios.c_ospeed = 115200;
-	td->termios = dc->tty_termios;
-	td->termios_locked = dc->tty_termios_locked;
 	tty_set_operations(dc->tty_driver, &tty_ops);
 
 	rval = tty_register_driver(td);
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC 1/13] Char: nozomi, remove unneded stuff, Jiri Slaby, (Fri Nov 9, 7:43 pm)
Re: [RFC 1/13] Char: nozomi, remove unneded stuff, Frank Seidel, (Sat Nov 10, 11:41 am)
Re: [RFC 1/13] Char: nozomi, remove unneded stuff, Jiri Slaby, (Sat Nov 10, 11:55 am)
[RFC 13/13] Char: nozomi, cleanup read and write, Jiri Slaby, (Fri Nov 9, 7:51 pm)
Re: [RFC 13/13] Char: nozomi, cleanup read and write, Adrian Bunk, (Sat Nov 10, 12:15 pm)
Re: [RFC 13/13] Char: nozomi, cleanup read and write, Jiri Slaby, (Sat Nov 10, 6:04 pm)
Re: [RFC 13/13] Char: nozomi, cleanup read and write, Adrian Bunk, (Mon Nov 12, 3:54 am)
Re: [RFC 13/13] Char: nozomi, cleanup read and write, Frank Seidel, (Mon Nov 12, 5:43 am)
Re: [RFC 13/13] Char: nozomi, cleanup read and write, Frank Seidel, (Sat Nov 10, 10:37 pm)
Re: [RFC 13/13] Char: nozomi, cleanup read and write, Frank Seidel, (Sun Nov 11, 12:02 pm)
Re: [RFC 13/13] Char: nozomi, cleanup read and write, Frank Seidel, (Sat Nov 10, 11:43 am)
[RFC 11/13] Char: nozomi, remove unused includes, Jiri Slaby, (Fri Nov 9, 7:50 pm)
Re: [RFC 11/13] Char: nozomi, remove unused includes, Frank Seidel, (Sat Nov 10, 11:43 am)
[RFC! 10/13] Char: nozomi, fix tty_flip_buffer_push, Jiri Slaby, (Fri Nov 9, 7:49 pm)
Re: [RFC! 10/13] Char: nozomi, fix tty_flip_buffer_push, Frank Seidel, (Sat Nov 10, 11:43 am)
[RFC 9/13] Char: nozomi, lock cleanup, Jiri Slaby, (Fri Nov 9, 7:48 pm)
Re: [RFC 9/13] Char: nozomi, lock cleanup, Frank Seidel, (Sat Nov 10, 11:42 am)
[RFC 8/13] Char: nozomi, tty cleanup, Jiri Slaby, (Fri Nov 9, 7:48 pm)
Re: [RFC 8/13] Char: nozomi, tty cleanup, Frank Seidel, (Mon Nov 12, 2:43 pm)
Re: [RFC 8/13] Char: nozomi, tty cleanup, Frank Seidel, (Sat Nov 10, 11:42 am)
[RFC 7/13] Char: nozomi, remove struct irq, Jiri Slaby, (Fri Nov 9, 7:47 pm)
Re: [RFC 7/13] Char: nozomi, remove struct irq, Frank Seidel, (Mon Nov 12, 11:11 am)
Re: [RFC 7/13] Char: nozomi, remove struct irq, Frank Seidel, (Sat Nov 10, 11:42 am)
[RFC 5/13] Char: nozomi, ioctls cleanup, Jiri Slaby, (Fri Nov 9, 7:46 pm)
Re: [RFC 5/13] Char: nozomi, ioctls cleanup, Frank Seidel, (Sat Nov 10, 11:41 am)
[RFC 4/13] Char: nozomi, tty index cleanup, Jiri Slaby, (Fri Nov 9, 7:45 pm)
Re: [RFC 4/13] Char: nozomi, tty index cleanup, Frank Seidel, (Sat Nov 10, 11:41 am)
Re: [RFC 4/13] Char: nozomi, tty index cleanup, Jiri Slaby, (Sat Nov 10, 11:50 am)
[RFC 3/13] Char: nozomi, fix fail paths, Jiri Slaby, (Fri Nov 9, 7:44 pm)
Re: [RFC 3/13] Char: nozomi, fix fail paths, Frank Seidel, (Sat Nov 10, 11:41 am)
[RFC 2/13] Char: nozomi, expand some functions, Jiri Slaby, (Fri Nov 9, 7:44 pm)
Re: [RFC 2/13] Char: nozomi, expand some functions, Frank Seidel, (Sat Nov 10, 11:41 am)
speck-geostationary