aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_io.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-22 16:13:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-22 16:13:47 -0400
commit53baaaa9682c230410a057263d1ce2922f43ddc4 (patch)
treef5cced5622130f780d76953b284a631c3d226488 /drivers/char/tty_io.c
parentf10140fbe5f97ecfeda986a12d0f1bad75642779 (diff)
parent3f9787046ea37a26170dc4439efa21f8d23a9978 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (79 commits) arm: bus_id -> dev_name() and dev_set_name() conversions sparc64: fix up bus_id changes in sparc core code 3c59x: handle pci_name() being const MTD: handle pci_name() being const HP iLO driver sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute sysdev: Add utility functions for simple int/ulong variable sysdev attributes sysdev: Pass the attribute to the low level sysdev show/store function driver core: Suppress sysfs warnings for device_rename(). kobject: Transmit return value of call_usermodehelper() to caller sysfs-rules.txt: reword API stability statement debugfs: Implement debugfs_remove_recursive() HOWTO: change email addresses of James in HOWTO always enable FW_LOADER unless EMBEDDED=y uio-howto.tmpl: use unique output names uio-howto.tmpl: use standard copyright/legal markings sysfs: don't call notify_change sysdev: fix debugging statements in registration code. kobject: should use kobject_put() in kset-example kobject: reorder kobject to save space on 64 bit builds ...
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r--drivers/char/tty_io.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index d94cd8410c53..15e597d03002 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3412,7 +3412,7 @@ struct device *tty_register_device(struct tty_driver *driver, unsigned index,
3412 else 3412 else
3413 tty_line_name(driver, index, name); 3413 tty_line_name(driver, index, name);
3414 3414
3415 return device_create(tty_class, device, dev, name); 3415 return device_create_drvdata(tty_class, device, dev, NULL, name);
3416} 3416}
3417 3417
3418/** 3418/**
@@ -3690,20 +3690,22 @@ static int __init tty_init(void)
3690 if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || 3690 if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
3691 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) 3691 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
3692 panic("Couldn't register /dev/tty driver\n"); 3692 panic("Couldn't register /dev/tty driver\n");
3693 device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), "tty"); 3693 device_create_drvdata(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL,
3694 "tty");
3694 3695
3695 cdev_init(&console_cdev, &console_fops); 3696 cdev_init(&console_cdev, &console_fops);
3696 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || 3697 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) ||
3697 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) 3698 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0)
3698 panic("Couldn't register /dev/console driver\n"); 3699 panic("Couldn't register /dev/console driver\n");
3699 device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), "console"); 3700 device_create_drvdata(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL,
3701 "console");
3700 3702
3701#ifdef CONFIG_UNIX98_PTYS 3703#ifdef CONFIG_UNIX98_PTYS
3702 cdev_init(&ptmx_cdev, &ptmx_fops); 3704 cdev_init(&ptmx_cdev, &ptmx_fops);
3703 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || 3705 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
3704 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) 3706 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
3705 panic("Couldn't register /dev/ptmx driver\n"); 3707 panic("Couldn't register /dev/ptmx driver\n");
3706 device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), "ptmx"); 3708 device_create_drvdata(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx");
3707#endif 3709#endif
3708 3710
3709#ifdef CONFIG_VT 3711#ifdef CONFIG_VT
@@ -3711,7 +3713,7 @@ static int __init tty_init(void)
3711 if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || 3713 if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
3712 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) 3714 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
3713 panic("Couldn't register /dev/tty0 driver\n"); 3715 panic("Couldn't register /dev/tty0 driver\n");
3714 device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), "tty0"); 3716 device_create_drvdata(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
3715 3717
3716 vty_init(); 3718 vty_init();
3717#endif 3719#endif