lkml.org 
[lkml]   [2011]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 3/6] TTY: serial, remove tasklet for tty_wakeup
    On Thu, 14 Jul 2011 14:35:12 +0200
    Jiri Slaby <jslaby@suse.cz> wrote:

    > 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: Greg Kroah-Hartman <gregkh@suse.de>
    > Cc: Alan Cox <alan@linux.intel.com>
    > ---
    > drivers/tty/serial/serial_core.c | 20 +-------------------
    > include/linux/serial_core.h | 1 -
    > 2 files changed, 1 insertions(+), 20 deletions(-)
    >
    > diff --git a/drivers/tty/serial/serial_core.c
    > b/drivers/tty/serial/serial_core.c index 2cbf1bd..4786232 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)
    > * closed. No cookie for you.
    > */
    > BUG_ON(!state);
    > - tasklet_schedule(&state->tlet);
    > + tty_wakeup(state->port.tty);

    Probably worth noting that this is only safe if the uart locks are held
    and because of the current lock/ref drop combinations in the
    serial_core code otherwise it can race with hangup...


    \
     
     \ /
      Last update: 2011-07-19 18:35    [W:0.023 / U:30.100 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site