tty_port.c (4f2c0a4acffbec01079c28f839422e64ddeff004) | tty_port.c (515be7baeddb04d786e3a7f4072791087c25bb04) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Tty port functions 4 */ 5 6#include <linux/types.h> 7#include <linux/errno.h> 8#include <linux/tty.h> --- 353 unchanged lines hidden (view full) --- 362 */ 363static void tty_port_shutdown(struct tty_port *port, struct tty_struct *tty) 364{ 365 mutex_lock(&port->mutex); 366 if (port->console) 367 goto out; 368 369 if (tty_port_initialized(port)) { | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Tty port functions 4 */ 5 6#include <linux/types.h> 7#include <linux/errno.h> 8#include <linux/tty.h> --- 353 unchanged lines hidden (view full) --- 362 */ 363static void tty_port_shutdown(struct tty_port *port, struct tty_struct *tty) 364{ 365 mutex_lock(&port->mutex); 366 if (port->console) 367 goto out; 368 369 if (tty_port_initialized(port)) { |
370 tty_port_set_initialized(port, 0); | 370 tty_port_set_initialized(port, false); |
371 /* 372 * Drop DTR/RTS if HUPCL is set. This causes any attached 373 * modem to hang up the line. 374 */ 375 if (tty && C_HUPCL(tty)) 376 tty_port_lower_dtr_rts(port); 377 378 if (port->ops->shutdown) --- 404 unchanged lines hidden (view full) --- 783 if (port->ops->activate) { 784 int retval = port->ops->activate(port, tty); 785 786 if (retval) { 787 mutex_unlock(&port->mutex); 788 return retval; 789 } 790 } | 371 /* 372 * Drop DTR/RTS if HUPCL is set. This causes any attached 373 * modem to hang up the line. 374 */ 375 if (tty && C_HUPCL(tty)) 376 tty_port_lower_dtr_rts(port); 377 378 if (port->ops->shutdown) --- 404 unchanged lines hidden (view full) --- 783 if (port->ops->activate) { 784 int retval = port->ops->activate(port, tty); 785 786 if (retval) { 787 mutex_unlock(&port->mutex); 788 return retval; 789 } 790 } |
791 tty_port_set_initialized(port, 1); | 791 tty_port_set_initialized(port, true); |
792 } 793 mutex_unlock(&port->mutex); 794 return tty_port_block_til_ready(port, tty, filp); 795} 796EXPORT_SYMBOL(tty_port_open); | 792 } 793 mutex_unlock(&port->mutex); 794 return tty_port_block_til_ready(port, tty, filp); 795} 796EXPORT_SYMBOL(tty_port_open); |