aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-06-21 00:15:16 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-26 15:25:07 -0400
commit7c69ef79741910883d5543caafa06aca3ebadbd1 (patch)
tree655d3f60abee0195d0aadb2c86ab04ccca89a307 /drivers/char
parent1a715c5cf917326a285533d1116d725f5f2593c2 (diff)
[PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree
Removes the devfs_mk_cdev() function and all callers of it. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/dsp56k.c8
-rw-r--r--drivers/char/dtlk.c3
-rw-r--r--drivers/char/ftape/zftape/zftape-init.c18
-rw-r--r--drivers/char/ip2/ip2main.c17
-rw-r--r--drivers/char/ipmi/ipmi_devintf.c3
-rw-r--r--drivers/char/istallion.c6
-rw-r--r--drivers/char/lp.c2
-rw-r--r--drivers/char/mem.c5
-rw-r--r--drivers/char/misc.c9
-rw-r--r--drivers/char/ppdev.c4
-rw-r--r--drivers/char/raw.c8
-rw-r--r--drivers/char/stallion.c6
-rw-r--r--drivers/char/tipar.c10
-rw-r--r--drivers/char/tty_io.c7
-rw-r--r--drivers/char/vc_screen.c8
-rw-r--r--drivers/char/viotape.c4
16 files changed, 4 insertions, 114 deletions
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index e233cf280bc0..45caf778578c 100644
--- a/drivers/char/dsp56k.c
+++ b/drivers/char/dsp56k.c
@@ -518,17 +518,9 @@ static int __init dsp56k_init_driver(void)
518 } 518 }
519 class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); 519 class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k");
520 520
521 err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0),
522 S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k");
523 if(err)
524 goto out_class;
525
526 printk(banner); 521 printk(banner);
527 goto out; 522 goto out;
528 523
529out_class:
530 class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0));
531 class_destroy(dsp56k_class);
532out_chrdev: 524out_chrdev:
533 unregister_chrdev(DSP56K_MAJOR, "dsp56k"); 525 unregister_chrdev(DSP56K_MAJOR, "dsp56k");
534out: 526out:
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index 87dcaa237f07..e34b4f4d1c27 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -337,9 +337,6 @@ static int __init dtlk_init(void)
337 if (dtlk_dev_probe() == 0) 337 if (dtlk_dev_probe() == 0)
338 printk(", MAJOR %d\n", dtlk_major); 338 printk(", MAJOR %d\n", dtlk_major);
339 339
340 devfs_mk_cdev(MKDEV(dtlk_major, DTLK_MINOR),
341 S_IFCHR | S_IRUSR | S_IWUSR, "dtlk");
342
343 init_timer(&dtlk_timer); 340 init_timer(&dtlk_timer);
344 dtlk_timer.function = dtlk_timer_tick; 341 dtlk_timer.function = dtlk_timer_tick;
345 init_waitqueue_head(&dtlk_process_list); 342 init_waitqueue_head(&dtlk_process_list);
diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c
index 821357ce7e0e..8c6090c3a421 100644
--- a/drivers/char/ftape/zftape/zftape-init.c
+++ b/drivers/char/ftape/zftape/zftape-init.c
@@ -332,29 +332,11 @@ KERN_INFO
332 zft_class = class_create(THIS_MODULE, "zft"); 332 zft_class = class_create(THIS_MODULE, "zft");
333 for (i = 0; i < 4; i++) { 333 for (i = 0; i < 4; i++) {
334 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); 334 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i);
335 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i),
336 S_IFCHR | S_IRUSR | S_IWUSR,
337 "qft%i", i);
338 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); 335 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i);
339 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 4),
340 S_IFCHR | S_IRUSR | S_IWUSR,
341 "nqft%i", i);
342 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); 336 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i);
343 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 16),
344 S_IFCHR | S_IRUSR | S_IWUSR,
345 "zqft%i", i);
346 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); 337 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i);
347 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 20),
348 S_IFCHR | S_IRUSR | S_IWUSR,
349 "nzqft%i", i);
350 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); 338 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i);
351 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 32),
352 S_IFCHR | S_IRUSR | S_IWUSR,
353 "rawqft%i", i);
354 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); 339 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i);
355 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 36),
356 S_IFCHR | S_IRUSR | S_IWUSR,
357 "nrawqft%i", i);
358 } 340 }
359 341
360#ifdef CONFIG_ZFT_COMPRESSOR 342#ifdef CONFIG_ZFT_COMPRESSOR
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 9ab33c3d359f..afc25db4975f 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -724,26 +724,9 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
724 class_device_create(ip2_class, NULL, 724 class_device_create(ip2_class, NULL,
725 MKDEV(IP2_IPL_MAJOR, 4 * i), 725 MKDEV(IP2_IPL_MAJOR, 4 * i),
726 NULL, "ipl%d", i); 726 NULL, "ipl%d", i);
727 err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i),
728 S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR,
729 "ip2/ipl%d", i);
730 if (err) {
731 class_device_destroy(ip2_class,
732 MKDEV(IP2_IPL_MAJOR, 4 * i));
733 goto out_class;
734 }
735
736 class_device_create(ip2_class, NULL, 727 class_device_create(ip2_class, NULL,
737 MKDEV(IP2_IPL_MAJOR, 4 * i + 1), 728 MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
738 NULL, "stat%d", i); 729 NULL, "stat%d", i);
739 err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
740 S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR,
741 "ip2/stat%d", i);
742 if (err) {
743 class_device_destroy(ip2_class,
744 MKDEV(IP2_IPL_MAJOR, 4 * i + 1));
745 goto out_class;
746 }
747 730
748 for ( box = 0; box < ABS_MAX_BOXES; ++box ) 731 for ( box = 0; box < ABS_MAX_BOXES; ++box )
749 { 732 {
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index 55c57451ee1d..ec22aba12be9 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -804,9 +804,6 @@ static void ipmi_new_smi(int if_num, struct device *device)
804 dev_t dev = MKDEV(ipmi_major, if_num); 804 dev_t dev = MKDEV(ipmi_major, if_num);
805 struct ipmi_reg_list *entry; 805 struct ipmi_reg_list *entry;
806 806
807 devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
808 "ipmidev/%d", if_num);
809
810 entry = kmalloc(sizeof(*entry), GFP_KERNEL); 807 entry = kmalloc(sizeof(*entry), GFP_KERNEL);
811 if (!entry) { 808 if (!entry) {
812 printk(KERN_ERR "ipmi_devintf: Unable to create the" 809 printk(KERN_ERR "ipmi_devintf: Unable to create the"
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index d5054ea47472..1395d4a5204e 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -5214,14 +5214,10 @@ int __init stli_init(void)
5214 "device\n"); 5214 "device\n");
5215 5215
5216 istallion_class = class_create(THIS_MODULE, "staliomem"); 5216 istallion_class = class_create(THIS_MODULE, "staliomem");
5217 for (i = 0; i < 4; i++) { 5217 for (i = 0; i < 4; i++)
5218 devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i),
5219 S_IFCHR | S_IRUSR | S_IWUSR,
5220 "staliomem/%d", i);
5221 class_device_create(istallion_class, NULL, 5218 class_device_create(istallion_class, NULL,
5222 MKDEV(STL_SIOMEMMAJOR, i), 5219 MKDEV(STL_SIOMEMMAJOR, i),
5223 NULL, "staliomem%d", i); 5220 NULL, "staliomem%d", i);
5224 }
5225 5221
5226/* 5222/*
5227 * Set up the tty driver structure and register us as a driver. 5223 * Set up the tty driver structure and register us as a driver.
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index f07a9e361f39..1a08e8ea238f 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -807,8 +807,6 @@ static int lp_register(int nr, struct parport *port)
807 807
808 class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL, 808 class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL,
809 "lp%d", nr); 809 "lp%d", nr);
810 devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO,
811 "printers/%d", nr);
812 810
813 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, 811 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name,
814 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); 812 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 1fa9fa157c12..e7aa71575aa2 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -941,13 +941,10 @@ static int __init chr_dev_init(void)
941 printk("unable to get major %d for memory devs\n", MEM_MAJOR); 941 printk("unable to get major %d for memory devs\n", MEM_MAJOR);
942 942
943 mem_class = class_create(THIS_MODULE, "mem"); 943 mem_class = class_create(THIS_MODULE, "mem");
944 for (i = 0; i < ARRAY_SIZE(devlist); i++) { 944 for (i = 0; i < ARRAY_SIZE(devlist); i++)
945 class_device_create(mem_class, NULL, 945 class_device_create(mem_class, NULL,
946 MKDEV(MEM_MAJOR, devlist[i].minor), 946 MKDEV(MEM_MAJOR, devlist[i].minor),
947 NULL, devlist[i].name); 947 NULL, devlist[i].name);
948 devfs_mk_cdev(MKDEV(MEM_MAJOR, devlist[i].minor),
949 S_IFCHR | devlist[i].mode, devlist[i].name);
950 }
951 948
952 return 0; 949 return 0;
953} 950}
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index 96eb2a709e21..71e513771048 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -204,7 +204,7 @@ int misc_register(struct miscdevice * misc)
204{ 204{
205 struct miscdevice *c; 205 struct miscdevice *c;
206 dev_t dev; 206 dev_t dev;
207 int err; 207 int err = 0;
208 208
209 down(&misc_sem); 209 down(&misc_sem);
210 list_for_each_entry(c, &misc_list, list) { 210 list_for_each_entry(c, &misc_list, list) {
@@ -241,13 +241,6 @@ int misc_register(struct miscdevice * misc)
241 goto out; 241 goto out;
242 } 242 }
243 243
244 err = devfs_mk_cdev(dev, S_IFCHR|S_IRUSR|S_IWUSR|S_IRGRP,
245 misc->devfs_name);
246 if (err) {
247 class_device_destroy(misc_class, dev);
248 goto out;
249 }
250
251 /* 244 /*
252 * Add it to the front, so that later devices can "override" 245 * Add it to the front, so that later devices can "override"
253 * earlier defaults 246 * earlier defaults
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index d437a4c9e634..ba350799405c 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -782,10 +782,6 @@ static int __init ppdev_init (void)
782 err = PTR_ERR(ppdev_class); 782 err = PTR_ERR(ppdev_class);
783 goto out_chrdev; 783 goto out_chrdev;
784 } 784 }
785 for (i = 0; i < PARPORT_MAX; i++) {
786 devfs_mk_cdev(MKDEV(PP_MAJOR, i),
787 S_IFCHR | S_IRUGO | S_IWUGO, "parports/%d", i);
788 }
789 if (parport_register_driver(&pp_driver)) { 785 if (parport_register_driver(&pp_driver)) {
790 printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); 786 printk (KERN_WARNING CHRDEV ": unable to register with parport\n");
791 goto out_class; 787 goto out_class;
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index 15a7b4086524..72c8ee4c0069 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -288,7 +288,6 @@ static struct cdev raw_cdev = {
288 288
289static int __init raw_init(void) 289static int __init raw_init(void)
290{ 290{
291 int i;
292 dev_t dev = MKDEV(RAW_MAJOR, 0); 291 dev_t dev = MKDEV(RAW_MAJOR, 0);
293 292
294 if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw")) 293 if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw"))
@@ -310,13 +309,6 @@ static int __init raw_init(void)
310 } 309 }
311 class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); 310 class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl");
312 311
313 devfs_mk_cdev(MKDEV(RAW_MAJOR, 0),
314 S_IFCHR | S_IRUGO | S_IWUGO,
315 "raw/rawctl");
316 for (i = 1; i < MAX_RAW_MINORS; i++)
317 devfs_mk_cdev(MKDEV(RAW_MAJOR, i),
318 S_IFCHR | S_IRUGO | S_IWUGO,
319 "raw/raw%d", i);
320 return 0; 312 return 0;
321 313
322error: 314error:
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index c090a63fbdea..a1a68f90d803 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -3071,14 +3071,10 @@ static int __init stl_init(void)
3071 printk("STALLION: failed to register serial board device\n"); 3071 printk("STALLION: failed to register serial board device\n");
3072 3072
3073 stallion_class = class_create(THIS_MODULE, "staliomem"); 3073 stallion_class = class_create(THIS_MODULE, "staliomem");
3074 for (i = 0; i < 4; i++) { 3074 for (i = 0; i < 4; i++)
3075 devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i),
3076 S_IFCHR|S_IRUSR|S_IWUSR,
3077 "staliomem/%d", i);
3078 class_device_create(stallion_class, NULL, 3075 class_device_create(stallion_class, NULL,
3079 MKDEV(STL_SIOMEMMAJOR, i), NULL, 3076 MKDEV(STL_SIOMEMMAJOR, i), NULL,
3080 "staliomem%d", i); 3077 "staliomem%d", i);
3081 }
3082 3078
3083 stl_serial->owner = THIS_MODULE; 3079 stl_serial->owner = THIS_MODULE;
3084 stl_serial->driver_name = stl_drvname; 3080 stl_serial->driver_name = stl_drvname;
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c
index 70cfe07ab999..0dc83a5bd4c1 100644
--- a/drivers/char/tipar.c
+++ b/drivers/char/tipar.c
@@ -443,12 +443,6 @@ tipar_register(int nr, struct parport *port)
443 443
444 class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR, 444 class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR,
445 TIPAR_MINOR + nr), NULL, "par%d", nr); 445 TIPAR_MINOR + nr), NULL, "par%d", nr);
446 /* Use devfs, tree: /dev/ticables/par/[0..2] */
447 err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr),
448 S_IFCHR | S_IRUGO | S_IWUGO,
449 "ticables/par/%d", nr);
450 if (err)
451 goto out_class;
452 446
453 /* Display informations */ 447 /* Display informations */
454 pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == 448 pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
@@ -460,11 +454,7 @@ tipar_register(int nr, struct parport *port)
460 pr_info("tipar%d: link cable not found\n", nr); 454 pr_info("tipar%d: link cable not found\n", nr);
461 455
462 err = 0; 456 err = 0;
463 goto out;
464 457
465out_class:
466 class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr));
467 class_destroy(tipar_class);
468out: 458out:
469 return err; 459 return err;
470} 460}
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 8b2a59969868..0b9a33c0f1bd 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2979,9 +2979,6 @@ struct class_device *tty_register_device(struct tty_driver *driver,
2979 return ERR_PTR(-EINVAL); 2979 return ERR_PTR(-EINVAL);
2980 } 2980 }
2981 2981
2982 devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
2983 "%s%d", driver->devfs_name, index + driver->name_base);
2984
2985 if (driver->type == TTY_DRIVER_TYPE_PTY) 2982 if (driver->type == TTY_DRIVER_TYPE_PTY)
2986 pty_line_name(driver, index, name); 2983 pty_line_name(driver, index, name);
2987 else 2984 else
@@ -3241,14 +3238,12 @@ static int __init tty_init(void)
3241 if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || 3238 if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
3242 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) 3239 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
3243 panic("Couldn't register /dev/tty driver\n"); 3240 panic("Couldn't register /dev/tty driver\n");
3244 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty");
3245 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); 3241 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty");
3246 3242
3247 cdev_init(&console_cdev, &console_fops); 3243 cdev_init(&console_cdev, &console_fops);
3248 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || 3244 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) ||
3249 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) 3245 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0)
3250 panic("Couldn't register /dev/console driver\n"); 3246 panic("Couldn't register /dev/console driver\n");
3251 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console");
3252 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); 3247 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console");
3253 3248
3254#ifdef CONFIG_UNIX98_PTYS 3249#ifdef CONFIG_UNIX98_PTYS
@@ -3256,7 +3251,6 @@ static int __init tty_init(void)
3256 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || 3251 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
3257 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) 3252 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
3258 panic("Couldn't register /dev/ptmx driver\n"); 3253 panic("Couldn't register /dev/ptmx driver\n");
3259 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx");
3260 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); 3254 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx");
3261#endif 3255#endif
3262 3256
@@ -3265,7 +3259,6 @@ static int __init tty_init(void)
3265 if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || 3259 if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
3266 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) 3260 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
3267 panic("Couldn't register /dev/tty0 driver\n"); 3261 panic("Couldn't register /dev/tty0 driver\n");
3268 devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0");
3269 class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); 3262 class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
3270 3263
3271 vty_init(); 3264 vty_init();
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index 3c1dafaa3441..1633d8206524 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -478,12 +478,6 @@ static struct class *vc_class;
478 478
479void vcs_make_devfs(struct tty_struct *tty) 479void vcs_make_devfs(struct tty_struct *tty)
480{ 480{
481 devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 1),
482 S_IFCHR|S_IRUSR|S_IWUSR,
483 "vcc/%u", tty->index + 1);
484 devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 129),
485 S_IFCHR|S_IRUSR|S_IWUSR,
486 "vcc/a%u", tty->index + 1);
487 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), 481 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
488 NULL, "vcs%u", tty->index + 1); 482 NULL, "vcs%u", tty->index + 1);
489 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), 483 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
@@ -503,8 +497,6 @@ int __init vcs_init(void)
503 panic("unable to get major %d for vcs device", VCS_MAJOR); 497 panic("unable to get major %d for vcs device", VCS_MAJOR);
504 vc_class = class_create(THIS_MODULE, "vc"); 498 vc_class = class_create(THIS_MODULE, "vc");
505 499
506 devfs_mk_cdev(MKDEV(VCS_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/0");
507 devfs_mk_cdev(MKDEV(VCS_MAJOR, 128), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/a0");
508 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); 500 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
509 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); 501 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
510 return 0; 502 return 0;
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index ebc337acca15..4c1a128fd77b 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -958,10 +958,6 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
958 "iseries!vt%d", i); 958 "iseries!vt%d", i);
959 class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), 959 class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
960 NULL, "iseries!nvt%d", i); 960 NULL, "iseries!nvt%d", i);
961 devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR,
962 "iseries/vt%d", i);
963 devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i | 0x80),
964 S_IFCHR | S_IRUSR | S_IWUSR, "iseries/nvt%d", i);
965 sprintf(tapename, "iseries/vt%d", i); 961 sprintf(tapename, "iseries/vt%d", i);
966 printk(VIOTAPE_KERN_INFO "tape %s is iSeries " 962 printk(VIOTAPE_KERN_INFO "tape %s is iSeries "
967 "resource %10.10s type %4.4s, model %3.3s\n", 963 "resource %10.10s type %4.4s, model %3.3s\n",