diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/fs3270.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index 78f8bda81dae..ef205ddd31a4 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c | |||
@@ -424,11 +424,15 @@ fs3270_open(struct inode *inode, struct file *filp) | |||
424 | minor = iminor(filp->f_dentry->d_inode); | 424 | minor = iminor(filp->f_dentry->d_inode); |
425 | /* Check for minor 0 multiplexer. */ | 425 | /* Check for minor 0 multiplexer. */ |
426 | if (minor == 0) { | 426 | if (minor == 0) { |
427 | if (!current->signal->tty) | 427 | struct tty_struct *tty; |
428 | mutex_lock(&tty_mutex); | ||
429 | tty = get_current_tty(); | ||
430 | if (!tty || tty->driver->major != IBM_TTY3270_MAJOR) { | ||
431 | mutex_unlock(&tty_mutex); | ||
428 | return -ENODEV; | 432 | return -ENODEV; |
429 | if (current->signal->tty->driver->major != IBM_TTY3270_MAJOR) | 433 | } |
430 | return -ENODEV; | 434 | minor = tty->index + RAW3270_FIRSTMINOR; |
431 | minor = current->signal->tty->index + RAW3270_FIRSTMINOR; | 435 | mutex_unlock(&tty_mutex); |
432 | } | 436 | } |
433 | /* Check if some other program is already using fullscreen mode. */ | 437 | /* Check if some other program is already using fullscreen mode. */ |
434 | fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor); | 438 | fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor); |