aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2011-07-14 08:35:12 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-23 13:34:06 -0400
commit6a3e492b6daaf7ec4dc41e51d87d2aae8ff886f2 (patch)
treed57d4010bbadee3a2d85a09433d49d4f0dbc5a56
parente150c4ccbe7246c27b5208599fe9f6677c93b5fe (diff)
TTY: serial, remove tasklet for tty_wakeup
tty_wakeup can be called from any context. So there is no need to have an extra tasklet for calling that. Hence save some space and remove the tasklet completely. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/tty/serial/serial_core.c20
-rw-r--r--include/linux/serial_core.h1
2 files changed, 1 insertions, 20 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 2cbf1bd493e2..4786232bc532 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -72,7 +72,7 @@ void uart_write_wakeup(struct uart_port *port)
72 * closed. No cookie for you. 72 * closed. No cookie for you.
73 */ 73 */
74 BUG_ON(!state); 74 BUG_ON(!state);
75 tasklet_schedule(&state->tlet); 75 tty_wakeup(state->port.tty);
76} 76}
77 77
78static void uart_stop(struct tty_struct *tty) 78static void uart_stop(struct tty_struct *tty)
@@ -107,12 +107,6 @@ static void uart_start(struct tty_struct *tty)
107 spin_unlock_irqrestore(&port->lock, flags); 107 spin_unlock_irqrestore(&port->lock, flags);
108} 108}
109 109
110static void uart_tasklet_action(unsigned long data)
111{
112 struct uart_state *state = (struct uart_state *)data;
113 tty_wakeup(state->port.tty);
114}
115
116static inline void 110static inline void
117uart_update_mctrl(struct uart_port *port, unsigned int set, unsigned int clear) 111uart_update_mctrl(struct uart_port *port, unsigned int set, unsigned int clear)
118{ 112{
@@ -250,11 +244,6 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)
250 } 244 }
251 245
252 /* 246 /*
253 * kill off our tasklet
254 */
255 tasklet_kill(&state->tlet);
256
257 /*
258 * Free the transmit buffer page. 247 * Free the transmit buffer page.
259 */ 248 */
260 if (state->xmit.buf) { 249 if (state->xmit.buf) {
@@ -2277,8 +2266,6 @@ int uart_register_driver(struct uart_driver *drv)
2277 port->ops = &uart_port_ops; 2266 port->ops = &uart_port_ops;
2278 port->close_delay = 500; /* .5 seconds */ 2267 port->close_delay = 500; /* .5 seconds */
2279 port->closing_wait = 30000; /* 30 seconds */ 2268 port->closing_wait = 30000; /* 30 seconds */
2280 tasklet_init(&state->tlet, uart_tasklet_action,
2281 (unsigned long)state);
2282 } 2269 }
2283 2270
2284 retval = tty_register_driver(normal); 2271 retval = tty_register_driver(normal);
@@ -2439,11 +2426,6 @@ int uart_remove_one_port(struct uart_driver *drv, struct uart_port *uport)
2439 */ 2426 */
2440 uport->type = PORT_UNKNOWN; 2427 uport->type = PORT_UNKNOWN;
2441 2428
2442 /*
2443 * Kill the tasklet, and free resources.
2444 */
2445 tasklet_kill(&state->tlet);
2446
2447 state->uart_port = NULL; 2429 state->uart_port = NULL;
2448 mutex_unlock(&port_mutex); 2430 mutex_unlock(&port_mutex);
2449 2431
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index a5c31146a337..76e110363745 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -384,7 +384,6 @@ struct uart_state {
384 int pm_state; 384 int pm_state;
385 struct circ_buf xmit; 385 struct circ_buf xmit;
386 386
387 struct tasklet_struct tlet;
388 struct uart_port *uart_port; 387 struct uart_port *uart_port;
389}; 388};
390 389