diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/tty_io.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 5289254e7ab3..df467284ff4e 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -3713,15 +3713,14 @@ int tty_register_driver(struct tty_driver *driver) | |||
3713 | 3713 | ||
3714 | if (!driver->major) { | 3714 | if (!driver->major) { |
3715 | error = alloc_chrdev_region(&dev, driver->minor_start, driver->num, | 3715 | error = alloc_chrdev_region(&dev, driver->minor_start, driver->num, |
3716 | (char*)driver->name); | 3716 | driver->name); |
3717 | if (!error) { | 3717 | if (!error) { |
3718 | driver->major = MAJOR(dev); | 3718 | driver->major = MAJOR(dev); |
3719 | driver->minor_start = MINOR(dev); | 3719 | driver->minor_start = MINOR(dev); |
3720 | } | 3720 | } |
3721 | } else { | 3721 | } else { |
3722 | dev = MKDEV(driver->major, driver->minor_start); | 3722 | dev = MKDEV(driver->major, driver->minor_start); |
3723 | error = register_chrdev_region(dev, driver->num, | 3723 | error = register_chrdev_region(dev, driver->num, driver->name); |
3724 | (char*)driver->name); | ||
3725 | } | 3724 | } |
3726 | if (error < 0) { | 3725 | if (error < 0) { |
3727 | kfree(p); | 3726 | kfree(p); |