|
@@ -335,7 +335,7 @@ EXPORT_SYMBOL(tty_port_lower_dtr_rts);
|
|
|
* tty_port_block_til_ready - Waiting logic for tty open
|
|
|
* @port: the tty port being opened
|
|
|
* @tty: the tty device being bound
|
|
|
- * @filp: the file pointer of the opener
|
|
|
+ * @filp: the file pointer of the opener or NULL
|
|
|
*
|
|
|
* Implement the core POSIX/SuS tty behaviour when opening a tty device.
|
|
|
* Handles:
|
|
@@ -369,7 +369,7 @@ int tty_port_block_til_ready(struct tty_port *port,
|
|
|
tty_port_set_active(port, 1);
|
|
|
return 0;
|
|
|
}
|
|
|
- if (filp->f_flags & O_NONBLOCK) {
|
|
|
+ if (filp == NULL || (filp->f_flags & O_NONBLOCK)) {
|
|
|
/* Indicate we are open */
|
|
|
if (C_BAUD(tty))
|
|
|
tty_port_raise_dtr_rts(port);
|