|
@@ -1365,7 +1365,6 @@ static int tty_reopen(struct tty_struct *tty)
|
|
|
* @driver: tty driver we are opening a device on
|
|
|
* @idx: device index
|
|
|
* @ret_tty: returned tty structure
|
|
|
- * @first_ok: ok to open a new device (used by ptmx)
|
|
|
*
|
|
|
* Prepare a tty device. This may not be a "new" clean device but
|
|
|
* could also be an active device. The pty drivers require special
|
|
@@ -1385,18 +1384,11 @@ static int tty_reopen(struct tty_struct *tty)
|
|
|
* relaxed for the (most common) case of reopening a tty.
|
|
|
*/
|
|
|
|
|
|
-struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx,
|
|
|
- int first_ok)
|
|
|
+struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
|
|
|
{
|
|
|
struct tty_struct *tty;
|
|
|
int retval;
|
|
|
|
|
|
- /* Check if pty master is being opened multiple times */
|
|
|
- if (driver->subtype == PTY_TYPE_MASTER &&
|
|
|
- (driver->flags & TTY_DRIVER_DEVPTS_MEM) && !first_ok) {
|
|
|
- return ERR_PTR(-EIO);
|
|
|
- }
|
|
|
-
|
|
|
/*
|
|
|
* First time open is complex, especially for PTY devices.
|
|
|
* This code guarantees that either everything succeeds and the
|
|
@@ -1950,7 +1942,7 @@ retry_open:
|
|
|
if (retval)
|
|
|
tty = ERR_PTR(retval);
|
|
|
} else
|
|
|
- tty = tty_init_dev(driver, index, 0);
|
|
|
+ tty = tty_init_dev(driver, index);
|
|
|
|
|
|
mutex_unlock(&tty_mutex);
|
|
|
if (driver)
|