• J
    TTY: serial, use tty_port_close_start helper · d30ccf08
    Jiri Slaby 提交于
    After the previous patches, the code is almost identical. There are
    few differences in the helper code:
    1) flush_buffer when flow_stopped
       * when a user doesn't care about the data, delete it anyways
    2) ASYNCB_INITIALIZED test before wait_until_sent_from
       * obviously, there is nothing to wait for if the port is dead
    3) drain_delay wait
       * we don't set drain_delay
    
    So we can use the helper now. It indeed removes a bunch of duplicated
    code.
    Signed-off-by: NJiri Slaby <jslaby@suse.cz>
    Cc: Alan Cox <alan@linux.intel.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
    d30ccf08
serial_core.c 62.3 KB