summaryrefslogtreecommitdiff
path: root/drivers/char/tty_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r--drivers/char/tty_io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 06184a0df09f..8298988afaf5 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -838,7 +838,7 @@ static int init_dev(struct tty_driver *driver, int idx,
if(!tty)
goto fail_no_mem;
initialize_tty_struct(tty);
- tty->device = mk_kdev(driver->major, driver->minor_start + idx);
+ tty->device = MKDEV(driver->major, driver->minor_start) + idx;
tty->driver = driver;
tty->index = idx;
tty_line_name(driver, idx, tty->name);
@@ -866,8 +866,8 @@ static int init_dev(struct tty_driver *driver, int idx,
if (!o_tty)
goto free_mem_out;
initialize_tty_struct(o_tty);
- o_tty->device = mk_kdev(driver->other->major,
- driver->other->minor_start + idx);
+ o_tty->device = MKDEV(driver->other->major,
+ driver->other->minor_start) + idx;
o_tty->driver = driver->other;
o_tty->index = idx;
tty_line_name(driver->other, idx, o_tty->name);
@@ -1321,7 +1321,7 @@ retry_open:
if (IS_TTY_DEV(device)) {
if (!current->tty)
return -ENXIO;
- device = current->tty->device;
+ device = to_kdev_t(current->tty->device);
filp->f_flags |= O_NONBLOCK; /* Don't let /dev/tty block */
/* noctty = 1; */
}