Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362164
b: refs/heads/master
c: 1fcbba3
h: refs/heads/master
v: v3
  • Loading branch information
Martin Schwidefsky committed Mar 21, 2013
1 parent cf38619 commit 23a99f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b7fef2dd7217d9e3f35c948e87297451e55c9709
refs/heads/master: 1fcbba3d65dff8ce9d25e644fcc86fa8c629de7d
16 changes: 9 additions & 7 deletions trunk/drivers/s390/char/tty3270.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty)
int i, rc;

/* Check if the tty3270 is already there. */
view = raw3270_find_view(&tty3270_fn, tty->index);
view = raw3270_find_view(&tty3270_fn, tty->index + RAW3270_FIRSTMINOR);
if (!IS_ERR(view)) {
tp = container_of(view, struct tty3270, view);
tty->driver_data = tp;
Expand All @@ -927,15 +927,16 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty)
tp->inattr = TF_INPUT;
return tty_port_install(&tp->port, driver, tty);
}
if (tty3270_max_index < tty->index)
tty3270_max_index = tty->index;
if (tty3270_max_index < tty->index + 1)
tty3270_max_index = tty->index + 1;

/* Allocate tty3270 structure on first open. */
tp = tty3270_alloc_view();
if (IS_ERR(tp))
return PTR_ERR(tp);

rc = raw3270_add_view(&tp->view, &tty3270_fn, tty->index);
rc = raw3270_add_view(&tp->view, &tty3270_fn,
tty->index + RAW3270_FIRSTMINOR);
if (rc) {
tty3270_free_view(tp);
return rc;
Expand Down Expand Up @@ -1846,12 +1847,12 @@ static const struct tty_operations tty3270_ops = {

void tty3270_create_cb(int minor)
{
tty_register_device(tty3270_driver, minor, NULL);
tty_register_device(tty3270_driver, minor - RAW3270_FIRSTMINOR, NULL);
}

void tty3270_destroy_cb(int minor)
{
tty_unregister_device(tty3270_driver, minor);
tty_unregister_device(tty3270_driver, minor - RAW3270_FIRSTMINOR);
}

struct raw3270_notifier tty3270_notifier =
Expand Down Expand Up @@ -1884,7 +1885,8 @@ static int __init tty3270_init(void)
driver->driver_name = "tty3270";
driver->name = "3270/tty";
driver->major = IBM_TTY3270_MAJOR;
driver->minor_start = 0;
driver->minor_start = RAW3270_FIRSTMINOR;
driver->name_base = RAW3270_FIRSTMINOR;
driver->type = TTY_DRIVER_TYPE_SYSTEM;
driver->subtype = SYSTEM_TYPE_TTY;
driver->init_termios = tty_std_termios;
Expand Down

0 comments on commit 23a99f9

Please sign in to comment.