diff options
Diffstat (limited to 'drivers/char')
32 files changed, 16 insertions, 225 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 122e7a72a4e1..2657eeba7da6 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -5250,7 +5250,6 @@ cy_init(void) | |||
5250 | cy_serial_driver->owner = THIS_MODULE; | 5250 | cy_serial_driver->owner = THIS_MODULE; |
5251 | cy_serial_driver->driver_name = "cyclades"; | 5251 | cy_serial_driver->driver_name = "cyclades"; |
5252 | cy_serial_driver->name = "ttyC"; | 5252 | cy_serial_driver->name = "ttyC"; |
5253 | cy_serial_driver->devfs_name = "tts/C"; | ||
5254 | cy_serial_driver->major = CYCLADES_MAJOR; | 5253 | cy_serial_driver->major = CYCLADES_MAJOR; |
5255 | cy_serial_driver->minor_start = 0; | 5254 | cy_serial_driver->minor_start = 0; |
5256 | cy_serial_driver->type = TTY_DRIVER_TYPE_SERIAL; | 5255 | cy_serial_driver->type = TTY_DRIVER_TYPE_SERIAL; |
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c index e233cf280bc0..09b413618b57 100644 --- a/drivers/char/dsp56k.c +++ b/drivers/char/dsp56k.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/fs.h> | 33 | #include <linux/fs.h> |
34 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/devfs_fs_kernel.h> | ||
37 | #include <linux/smp_lock.h> | 36 | #include <linux/smp_lock.h> |
38 | #include <linux/device.h> | 37 | #include <linux/device.h> |
39 | 38 | ||
@@ -518,17 +517,9 @@ static int __init dsp56k_init_driver(void) | |||
518 | } | 517 | } |
519 | class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); | 518 | class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); |
520 | 519 | ||
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); | 520 | printk(banner); |
527 | goto out; | 521 | goto out; |
528 | 522 | ||
529 | out_class: | ||
530 | class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); | ||
531 | class_destroy(dsp56k_class); | ||
532 | out_chrdev: | 523 | out_chrdev: |
533 | unregister_chrdev(DSP56K_MAJOR, "dsp56k"); | 524 | unregister_chrdev(DSP56K_MAJOR, "dsp56k"); |
534 | out: | 525 | out: |
@@ -541,7 +532,6 @@ static void __exit dsp56k_cleanup_driver(void) | |||
541 | class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); | 532 | class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); |
542 | class_destroy(dsp56k_class); | 533 | class_destroy(dsp56k_class); |
543 | unregister_chrdev(DSP56K_MAJOR, "dsp56k"); | 534 | unregister_chrdev(DSP56K_MAJOR, "dsp56k"); |
544 | devfs_remove("dsp56k"); | ||
545 | } | 535 | } |
546 | module_exit(dsp56k_cleanup_driver); | 536 | module_exit(dsp56k_cleanup_driver); |
547 | 537 | ||
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c index 87dcaa237f07..da2c89f1b8bc 100644 --- a/drivers/char/dtlk.c +++ b/drivers/char/dtlk.c | |||
@@ -62,7 +62,6 @@ | |||
62 | #include <linux/init.h> /* for __init, module_{init,exit} */ | 62 | #include <linux/init.h> /* for __init, module_{init,exit} */ |
63 | #include <linux/poll.h> /* for POLLIN, etc. */ | 63 | #include <linux/poll.h> /* for POLLIN, etc. */ |
64 | #include <linux/dtlk.h> /* local header file for DoubleTalk values */ | 64 | #include <linux/dtlk.h> /* local header file for DoubleTalk values */ |
65 | #include <linux/devfs_fs_kernel.h> | ||
66 | #include <linux/smp_lock.h> | 65 | #include <linux/smp_lock.h> |
67 | 66 | ||
68 | #ifdef TRACING | 67 | #ifdef TRACING |
@@ -337,9 +336,6 @@ static int __init dtlk_init(void) | |||
337 | if (dtlk_dev_probe() == 0) | 336 | if (dtlk_dev_probe() == 0) |
338 | printk(", MAJOR %d\n", dtlk_major); | 337 | printk(", MAJOR %d\n", dtlk_major); |
339 | 338 | ||
340 | devfs_mk_cdev(MKDEV(dtlk_major, DTLK_MINOR), | ||
341 | S_IFCHR | S_IRUSR | S_IWUSR, "dtlk"); | ||
342 | |||
343 | init_timer(&dtlk_timer); | 339 | init_timer(&dtlk_timer); |
344 | dtlk_timer.function = dtlk_timer_tick; | 340 | dtlk_timer.function = dtlk_timer_tick; |
345 | init_waitqueue_head(&dtlk_process_list); | 341 | init_waitqueue_head(&dtlk_process_list); |
@@ -357,7 +353,6 @@ static void __exit dtlk_cleanup (void) | |||
357 | 353 | ||
358 | dtlk_write_tts(DTLK_CLEAR); | 354 | dtlk_write_tts(DTLK_CLEAR); |
359 | unregister_chrdev(dtlk_major, "dtlk"); | 355 | unregister_chrdev(dtlk_major, "dtlk"); |
360 | devfs_remove("dtlk"); | ||
361 | release_region(dtlk_port_lpc, DTLK_IO_EXTENT); | 356 | release_region(dtlk_port_lpc, DTLK_IO_EXTENT); |
362 | } | 357 | } |
363 | 358 | ||
diff --git a/drivers/char/epca.c b/drivers/char/epca.c index dc0602ae8503..d0b3890d9302 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c | |||
@@ -1232,7 +1232,6 @@ static int __init pc_init(void) | |||
1232 | 1232 | ||
1233 | pc_driver->owner = THIS_MODULE; | 1233 | pc_driver->owner = THIS_MODULE; |
1234 | pc_driver->name = "ttyD"; | 1234 | pc_driver->name = "ttyD"; |
1235 | pc_driver->devfs_name = "tts/D"; | ||
1236 | pc_driver->major = DIGI_MAJOR; | 1235 | pc_driver->major = DIGI_MAJOR; |
1237 | pc_driver->minor_start = 0; | 1236 | pc_driver->minor_start = 0; |
1238 | pc_driver->type = TTY_DRIVER_TYPE_SERIAL; | 1237 | pc_driver->type = TTY_DRIVER_TYPE_SERIAL; |
diff --git a/drivers/char/esp.c b/drivers/char/esp.c index 922174d527ae..9827d170ca17 100644 --- a/drivers/char/esp.c +++ b/drivers/char/esp.c | |||
@@ -2449,7 +2449,6 @@ static int __init espserial_init(void) | |||
2449 | 2449 | ||
2450 | esp_driver->owner = THIS_MODULE; | 2450 | esp_driver->owner = THIS_MODULE; |
2451 | esp_driver->name = "ttyP"; | 2451 | esp_driver->name = "ttyP"; |
2452 | esp_driver->devfs_name = "tts/P"; | ||
2453 | esp_driver->major = ESP_IN_MAJOR; | 2452 | esp_driver->major = ESP_IN_MAJOR; |
2454 | esp_driver->minor_start = 0; | 2453 | esp_driver->minor_start = 0; |
2455 | esp_driver->type = TTY_DRIVER_TYPE_SERIAL; | 2454 | esp_driver->type = TTY_DRIVER_TYPE_SERIAL; |
diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c index 821357ce7e0e..3eeb869a9a11 100644 --- a/drivers/char/ftape/zftape/zftape-init.c +++ b/drivers/char/ftape/zftape/zftape-init.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #endif | 33 | #endif |
34 | #include <linux/fcntl.h> | 34 | #include <linux/fcntl.h> |
35 | #include <linux/smp_lock.h> | 35 | #include <linux/smp_lock.h> |
36 | #include <linux/devfs_fs_kernel.h> | ||
37 | 36 | ||
38 | #include <linux/zftape.h> | 37 | #include <linux/zftape.h> |
39 | #include <linux/init.h> | 38 | #include <linux/init.h> |
@@ -332,29 +331,11 @@ KERN_INFO | |||
332 | zft_class = class_create(THIS_MODULE, "zft"); | 331 | zft_class = class_create(THIS_MODULE, "zft"); |
333 | for (i = 0; i < 4; i++) { | 332 | for (i = 0; i < 4; i++) { |
334 | class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); | 333 | 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); | 334 | 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); | 335 | 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); | 336 | 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); | 337 | 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); | 338 | 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 | } | 339 | } |
359 | 340 | ||
360 | #ifdef CONFIG_ZFT_COMPRESSOR | 341 | #ifdef CONFIG_ZFT_COMPRESSOR |
@@ -380,17 +361,11 @@ static void zft_exit(void) | |||
380 | TRACE(ft_t_info, "successful"); | 361 | TRACE(ft_t_info, "successful"); |
381 | } | 362 | } |
382 | for (i = 0; i < 4; i++) { | 363 | for (i = 0; i < 4; i++) { |
383 | devfs_remove("qft%i", i); | ||
384 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i)); | 364 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i)); |
385 | devfs_remove("nqft%i", i); | ||
386 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4)); | 365 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4)); |
387 | devfs_remove("zqft%i", i); | ||
388 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16)); | 366 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16)); |
389 | devfs_remove("nzqft%i", i); | ||
390 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20)); | 367 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20)); |
391 | devfs_remove("rawqft%i", i); | ||
392 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32)); | 368 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32)); |
393 | devfs_remove("nrawqft%i", i); | ||
394 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36)); | 369 | class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36)); |
395 | } | 370 | } |
396 | class_destroy(zft_class); | 371 | class_destroy(zft_class); |
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index a5c6a9d7ff08..6e380aecea6a 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -820,7 +820,6 @@ int __init hvc_init(void) | |||
820 | return -ENOMEM; | 820 | return -ENOMEM; |
821 | 821 | ||
822 | drv->owner = THIS_MODULE; | 822 | drv->owner = THIS_MODULE; |
823 | drv->devfs_name = "hvc/"; | ||
824 | drv->driver_name = "hvc"; | 823 | drv->driver_name = "hvc"; |
825 | drv->name = "hvc"; | 824 | drv->name = "hvc"; |
826 | drv->major = HVC_MAJOR; | 825 | drv->major = HVC_MAJOR; |
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c index afa26b65dac3..130dedc37568 100644 --- a/drivers/char/hvcs.c +++ b/drivers/char/hvcs.c | |||
@@ -1363,7 +1363,6 @@ static int __init hvcs_module_init(void) | |||
1363 | 1363 | ||
1364 | hvcs_tty_driver->driver_name = hvcs_driver_name; | 1364 | hvcs_tty_driver->driver_name = hvcs_driver_name; |
1365 | hvcs_tty_driver->name = hvcs_device_node; | 1365 | hvcs_tty_driver->name = hvcs_device_node; |
1366 | hvcs_tty_driver->devfs_name = hvcs_device_node; | ||
1367 | 1366 | ||
1368 | /* | 1367 | /* |
1369 | * We'll let the system assign us a major number, indicated by leaving | 1368 | * We'll let the system assign us a major number, indicated by leaving |
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index a0370ed752ce..7b04eb153205 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c | |||
@@ -1154,7 +1154,6 @@ static int __init hvsi_init(void) | |||
1154 | return -ENOMEM; | 1154 | return -ENOMEM; |
1155 | 1155 | ||
1156 | hvsi_driver->owner = THIS_MODULE; | 1156 | hvsi_driver->owner = THIS_MODULE; |
1157 | hvsi_driver->devfs_name = "hvsi/"; | ||
1158 | hvsi_driver->driver_name = "hvsi"; | 1157 | hvsi_driver->driver_name = "hvsi"; |
1159 | hvsi_driver->name = "hvsi"; | 1158 | hvsi_driver->name = "hvsi"; |
1160 | hvsi_driver->major = HVSI_MAJOR; | 1159 | hvsi_driver->major = HVSI_MAJOR; |
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 9ab33c3d359f..8619542766cb 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c | |||
@@ -91,7 +91,6 @@ | |||
91 | #include <linux/module.h> | 91 | #include <linux/module.h> |
92 | #include <linux/signal.h> | 92 | #include <linux/signal.h> |
93 | #include <linux/sched.h> | 93 | #include <linux/sched.h> |
94 | #include <linux/devfs_fs_kernel.h> | ||
95 | #include <linux/timer.h> | 94 | #include <linux/timer.h> |
96 | #include <linux/interrupt.h> | 95 | #include <linux/interrupt.h> |
97 | #include <linux/pci.h> | 96 | #include <linux/pci.h> |
@@ -414,9 +413,7 @@ cleanup_module(void) | |||
414 | /* free io addresses and Tibet */ | 413 | /* free io addresses and Tibet */ |
415 | release_region( ip2config.addr[i], 8 ); | 414 | release_region( ip2config.addr[i], 8 ); |
416 | class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); | 415 | class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); |
417 | devfs_remove("ip2/ipl%d", i); | ||
418 | class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); | 416 | class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); |
419 | devfs_remove("ip2/stat%d", i); | ||
420 | } | 417 | } |
421 | /* Disable and remove interrupt handler. */ | 418 | /* Disable and remove interrupt handler. */ |
422 | if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) { | 419 | if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) { |
@@ -425,7 +422,6 @@ cleanup_module(void) | |||
425 | } | 422 | } |
426 | } | 423 | } |
427 | class_destroy(ip2_class); | 424 | class_destroy(ip2_class); |
428 | devfs_remove("ip2"); | ||
429 | if ( ( err = tty_unregister_driver ( ip2_tty_driver ) ) ) { | 425 | if ( ( err = tty_unregister_driver ( ip2_tty_driver ) ) ) { |
430 | printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err); | 426 | printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err); |
431 | } | 427 | } |
@@ -675,7 +671,6 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) | |||
675 | 671 | ||
676 | ip2_tty_driver->owner = THIS_MODULE; | 672 | ip2_tty_driver->owner = THIS_MODULE; |
677 | ip2_tty_driver->name = "ttyF"; | 673 | ip2_tty_driver->name = "ttyF"; |
678 | ip2_tty_driver->devfs_name = "tts/F"; | ||
679 | ip2_tty_driver->driver_name = pcDriver_name; | 674 | ip2_tty_driver->driver_name = pcDriver_name; |
680 | ip2_tty_driver->major = IP2_TTY_MAJOR; | 675 | ip2_tty_driver->major = IP2_TTY_MAJOR; |
681 | ip2_tty_driver->minor_start = 0; | 676 | ip2_tty_driver->minor_start = 0; |
@@ -683,7 +678,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) | |||
683 | ip2_tty_driver->subtype = SERIAL_TYPE_NORMAL; | 678 | ip2_tty_driver->subtype = SERIAL_TYPE_NORMAL; |
684 | ip2_tty_driver->init_termios = tty_std_termios; | 679 | ip2_tty_driver->init_termios = tty_std_termios; |
685 | ip2_tty_driver->init_termios.c_cflag = B9600|CS8|CREAD|HUPCL|CLOCAL; | 680 | ip2_tty_driver->init_termios.c_cflag = B9600|CS8|CREAD|HUPCL|CLOCAL; |
686 | ip2_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; | 681 | ip2_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; |
687 | tty_set_operations(ip2_tty_driver, &ip2_ops); | 682 | tty_set_operations(ip2_tty_driver, &ip2_ops); |
688 | 683 | ||
689 | ip2trace (ITRC_NO_PORT, ITRC_INIT, 3, 0 ); | 684 | ip2trace (ITRC_NO_PORT, ITRC_INIT, 3, 0 ); |
@@ -724,26 +719,9 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) | |||
724 | class_device_create(ip2_class, NULL, | 719 | class_device_create(ip2_class, NULL, |
725 | MKDEV(IP2_IPL_MAJOR, 4 * i), | 720 | MKDEV(IP2_IPL_MAJOR, 4 * i), |
726 | NULL, "ipl%d", i); | 721 | 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, | 722 | class_device_create(ip2_class, NULL, |
737 | MKDEV(IP2_IPL_MAJOR, 4 * i + 1), | 723 | MKDEV(IP2_IPL_MAJOR, 4 * i + 1), |
738 | NULL, "stat%d", i); | 724 | 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 | 725 | ||
748 | for ( box = 0; box < ABS_MAX_BOXES; ++box ) | 726 | for ( box = 0; box < ABS_MAX_BOXES; ++box ) |
749 | { | 727 | { |
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index e1c95374984c..da637adbbfaa 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/poll.h> | 40 | #include <linux/poll.h> |
41 | #include <linux/spinlock.h> | 41 | #include <linux/spinlock.h> |
42 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
43 | #include <linux/devfs_fs_kernel.h> | ||
44 | #include <linux/ipmi.h> | 43 | #include <linux/ipmi.h> |
45 | #include <linux/mutex.h> | 44 | #include <linux/mutex.h> |
46 | #include <linux/init.h> | 45 | #include <linux/init.h> |
@@ -804,9 +803,6 @@ static void ipmi_new_smi(int if_num, struct device *device) | |||
804 | dev_t dev = MKDEV(ipmi_major, if_num); | 803 | dev_t dev = MKDEV(ipmi_major, if_num); |
805 | struct ipmi_reg_list *entry; | 804 | struct ipmi_reg_list *entry; |
806 | 805 | ||
807 | devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, | ||
808 | "ipmidev/%d", if_num); | ||
809 | |||
810 | entry = kmalloc(sizeof(*entry), GFP_KERNEL); | 806 | entry = kmalloc(sizeof(*entry), GFP_KERNEL); |
811 | if (!entry) { | 807 | if (!entry) { |
812 | printk(KERN_ERR "ipmi_devintf: Unable to create the" | 808 | printk(KERN_ERR "ipmi_devintf: Unable to create the" |
@@ -836,7 +832,6 @@ static void ipmi_smi_gone(int if_num) | |||
836 | } | 832 | } |
837 | class_device_destroy(ipmi_class, dev); | 833 | class_device_destroy(ipmi_class, dev); |
838 | mutex_unlock(®_list_mutex); | 834 | mutex_unlock(®_list_mutex); |
839 | devfs_remove("ipmidev/%d", if_num); | ||
840 | } | 835 | } |
841 | 836 | ||
842 | static struct ipmi_smi_watcher smi_watcher = | 837 | static struct ipmi_smi_watcher smi_watcher = |
@@ -872,8 +867,6 @@ static __init int init_ipmi_devintf(void) | |||
872 | ipmi_major = rv; | 867 | ipmi_major = rv; |
873 | } | 868 | } |
874 | 869 | ||
875 | devfs_mk_dir(DEVICE_NAME); | ||
876 | |||
877 | rv = ipmi_smi_watcher_register(&smi_watcher); | 870 | rv = ipmi_smi_watcher_register(&smi_watcher); |
878 | if (rv) { | 871 | if (rv) { |
879 | unregister_chrdev(ipmi_major, DEVICE_NAME); | 872 | unregister_chrdev(ipmi_major, DEVICE_NAME); |
@@ -898,7 +891,6 @@ static __exit void cleanup_ipmi(void) | |||
898 | mutex_unlock(®_list_mutex); | 891 | mutex_unlock(®_list_mutex); |
899 | class_destroy(ipmi_class); | 892 | class_destroy(ipmi_class); |
900 | ipmi_smi_watcher_unregister(&smi_watcher); | 893 | ipmi_smi_watcher_unregister(&smi_watcher); |
901 | devfs_remove(DEVICE_NAME); | ||
902 | unregister_chrdev(ipmi_major, DEVICE_NAME); | 894 | unregister_chrdev(ipmi_major, DEVICE_NAME); |
903 | } | 895 | } |
904 | module_exit(cleanup_ipmi); | 896 | module_exit(cleanup_ipmi); |
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index efaaa1937ab6..478bf4d7d065 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -1581,7 +1581,6 @@ static int __devinit isicom_register_tty_driver(void) | |||
1581 | 1581 | ||
1582 | isicom_normal->owner = THIS_MODULE; | 1582 | isicom_normal->owner = THIS_MODULE; |
1583 | isicom_normal->name = "ttyM"; | 1583 | isicom_normal->name = "ttyM"; |
1584 | isicom_normal->devfs_name = "isicom/"; | ||
1585 | isicom_normal->major = ISICOM_NMAJOR; | 1584 | isicom_normal->major = ISICOM_NMAJOR; |
1586 | isicom_normal->minor_start = 0; | 1585 | isicom_normal->minor_start = 0; |
1587 | isicom_normal->type = TTY_DRIVER_TYPE_SERIAL; | 1586 | isicom_normal->type = TTY_DRIVER_TYPE_SERIAL; |
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 216c79256de3..c74e5660a9b7 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/ioport.h> | 39 | #include <linux/ioport.h> |
40 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/devfs_fs_kernel.h> | ||
43 | #include <linux/device.h> | 42 | #include <linux/device.h> |
44 | #include <linux/wait.h> | 43 | #include <linux/wait.h> |
45 | #include <linux/eisa.h> | 44 | #include <linux/eisa.h> |
@@ -826,11 +825,8 @@ static void __exit istallion_module_exit(void) | |||
826 | return; | 825 | return; |
827 | } | 826 | } |
828 | put_tty_driver(stli_serial); | 827 | put_tty_driver(stli_serial); |
829 | for (i = 0; i < 4; i++) { | 828 | for (i = 0; i < 4; i++) |
830 | devfs_remove("staliomem/%d", i); | ||
831 | class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, i)); | 829 | class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, i)); |
832 | } | ||
833 | devfs_remove("staliomem"); | ||
834 | class_destroy(istallion_class); | 830 | class_destroy(istallion_class); |
835 | if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) | 831 | if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) |
836 | printk("STALLION: failed to un-register serial memory device, " | 832 | printk("STALLION: failed to un-register serial memory device, " |
@@ -4728,16 +4724,11 @@ int __init stli_init(void) | |||
4728 | printk(KERN_ERR "STALLION: failed to register serial memory " | 4724 | printk(KERN_ERR "STALLION: failed to register serial memory " |
4729 | "device\n"); | 4725 | "device\n"); |
4730 | 4726 | ||
4731 | devfs_mk_dir("staliomem"); | ||
4732 | istallion_class = class_create(THIS_MODULE, "staliomem"); | 4727 | istallion_class = class_create(THIS_MODULE, "staliomem"); |
4733 | for (i = 0; i < 4; i++) { | 4728 | for (i = 0; i < 4; i++) |
4734 | devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), | ||
4735 | S_IFCHR | S_IRUSR | S_IWUSR, | ||
4736 | "staliomem/%d", i); | ||
4737 | class_device_create(istallion_class, NULL, | 4729 | class_device_create(istallion_class, NULL, |
4738 | MKDEV(STL_SIOMEMMAJOR, i), | 4730 | MKDEV(STL_SIOMEMMAJOR, i), |
4739 | NULL, "staliomem%d", i); | 4731 | NULL, "staliomem%d", i); |
4740 | } | ||
4741 | 4732 | ||
4742 | /* | 4733 | /* |
4743 | * Set up the tty driver structure and register us as a driver. | 4734 | * 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 e57260525293..b11a390581ba 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -120,7 +120,6 @@ | |||
120 | #include <linux/major.h> | 120 | #include <linux/major.h> |
121 | #include <linux/sched.h> | 121 | #include <linux/sched.h> |
122 | #include <linux/smp_lock.h> | 122 | #include <linux/smp_lock.h> |
123 | #include <linux/devfs_fs_kernel.h> | ||
124 | #include <linux/slab.h> | 123 | #include <linux/slab.h> |
125 | #include <linux/fcntl.h> | 124 | #include <linux/fcntl.h> |
126 | #include <linux/delay.h> | 125 | #include <linux/delay.h> |
@@ -807,8 +806,6 @@ static int lp_register(int nr, struct parport *port) | |||
807 | 806 | ||
808 | class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL, | 807 | class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL, |
809 | "lp%d", nr); | 808 | "lp%d", nr); |
810 | devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO, | ||
811 | "printers/%d", nr); | ||
812 | 809 | ||
813 | printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, | 810 | printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, |
814 | (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); | 811 | (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); |
@@ -907,7 +904,6 @@ static int __init lp_init (void) | |||
907 | return -EIO; | 904 | return -EIO; |
908 | } | 905 | } |
909 | 906 | ||
910 | devfs_mk_dir("printers"); | ||
911 | lp_class = class_create(THIS_MODULE, "printer"); | 907 | lp_class = class_create(THIS_MODULE, "printer"); |
912 | if (IS_ERR(lp_class)) { | 908 | if (IS_ERR(lp_class)) { |
913 | err = PTR_ERR(lp_class); | 909 | err = PTR_ERR(lp_class); |
@@ -933,7 +929,6 @@ static int __init lp_init (void) | |||
933 | out_class: | 929 | out_class: |
934 | class_destroy(lp_class); | 930 | class_destroy(lp_class); |
935 | out_devfs: | 931 | out_devfs: |
936 | devfs_remove("printers"); | ||
937 | unregister_chrdev(LP_MAJOR, "lp"); | 932 | unregister_chrdev(LP_MAJOR, "lp"); |
938 | return err; | 933 | return err; |
939 | } | 934 | } |
@@ -981,10 +976,8 @@ static void lp_cleanup_module (void) | |||
981 | if (lp_table[offset].dev == NULL) | 976 | if (lp_table[offset].dev == NULL) |
982 | continue; | 977 | continue; |
983 | parport_unregister_device(lp_table[offset].dev); | 978 | parport_unregister_device(lp_table[offset].dev); |
984 | devfs_remove("printers/%d", offset); | ||
985 | class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); | 979 | class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); |
986 | } | 980 | } |
987 | devfs_remove("printers"); | ||
988 | class_destroy(lp_class); | 981 | class_destroy(lp_class); |
989 | } | 982 | } |
990 | 983 | ||
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 1fa9fa157c12..6fe7b6c6c462 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/tty.h> | 20 | #include <linux/tty.h> |
21 | #include <linux/capability.h> | 21 | #include <linux/capability.h> |
22 | #include <linux/smp_lock.h> | 22 | #include <linux/smp_lock.h> |
23 | #include <linux/devfs_fs_kernel.h> | ||
24 | #include <linux/ptrace.h> | 23 | #include <linux/ptrace.h> |
25 | #include <linux/device.h> | 24 | #include <linux/device.h> |
26 | #include <linux/highmem.h> | 25 | #include <linux/highmem.h> |
@@ -941,13 +940,10 @@ static int __init chr_dev_init(void) | |||
941 | printk("unable to get major %d for memory devs\n", MEM_MAJOR); | 940 | printk("unable to get major %d for memory devs\n", MEM_MAJOR); |
942 | 941 | ||
943 | mem_class = class_create(THIS_MODULE, "mem"); | 942 | mem_class = class_create(THIS_MODULE, "mem"); |
944 | for (i = 0; i < ARRAY_SIZE(devlist); i++) { | 943 | for (i = 0; i < ARRAY_SIZE(devlist); i++) |
945 | class_device_create(mem_class, NULL, | 944 | class_device_create(mem_class, NULL, |
946 | MKDEV(MEM_MAJOR, devlist[i].minor), | 945 | MKDEV(MEM_MAJOR, devlist[i].minor), |
947 | NULL, devlist[i].name); | 946 | 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 | 947 | ||
952 | return 0; | 948 | return 0; |
953 | } | 949 | } |
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 96eb2a709e21..dfe1cede3916 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
45 | #include <linux/proc_fs.h> | 45 | #include <linux/proc_fs.h> |
46 | #include <linux/seq_file.h> | 46 | #include <linux/seq_file.h> |
47 | #include <linux/devfs_fs_kernel.h> | ||
48 | #include <linux/stat.h> | 47 | #include <linux/stat.h> |
49 | #include <linux/init.h> | 48 | #include <linux/init.h> |
50 | #include <linux/device.h> | 49 | #include <linux/device.h> |
@@ -204,7 +203,7 @@ int misc_register(struct miscdevice * misc) | |||
204 | { | 203 | { |
205 | struct miscdevice *c; | 204 | struct miscdevice *c; |
206 | dev_t dev; | 205 | dev_t dev; |
207 | int err; | 206 | int err = 0; |
208 | 207 | ||
209 | down(&misc_sem); | 208 | down(&misc_sem); |
210 | list_for_each_entry(c, &misc_list, list) { | 209 | list_for_each_entry(c, &misc_list, list) { |
@@ -228,10 +227,6 @@ int misc_register(struct miscdevice * misc) | |||
228 | 227 | ||
229 | if (misc->minor < DYNAMIC_MINORS) | 228 | if (misc->minor < DYNAMIC_MINORS) |
230 | misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); | 229 | misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); |
231 | if (misc->devfs_name[0] == '\0') { | ||
232 | snprintf(misc->devfs_name, sizeof(misc->devfs_name), | ||
233 | "misc/%s", misc->name); | ||
234 | } | ||
235 | dev = MKDEV(MISC_MAJOR, misc->minor); | 230 | dev = MKDEV(MISC_MAJOR, misc->minor); |
236 | 231 | ||
237 | misc->class = class_device_create(misc_class, NULL, dev, misc->dev, | 232 | misc->class = class_device_create(misc_class, NULL, dev, misc->dev, |
@@ -241,13 +236,6 @@ int misc_register(struct miscdevice * misc) | |||
241 | goto out; | 236 | goto out; |
242 | } | 237 | } |
243 | 238 | ||
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 | /* | 239 | /* |
252 | * Add it to the front, so that later devices can "override" | 240 | * Add it to the front, so that later devices can "override" |
253 | * earlier defaults | 241 | * earlier defaults |
@@ -278,7 +266,6 @@ int misc_deregister(struct miscdevice * misc) | |||
278 | down(&misc_sem); | 266 | down(&misc_sem); |
279 | list_del(&misc->list); | 267 | list_del(&misc->list); |
280 | class_device_destroy(misc_class, MKDEV(MISC_MAJOR, misc->minor)); | 268 | class_device_destroy(misc_class, MKDEV(MISC_MAJOR, misc->minor)); |
281 | devfs_remove(misc->devfs_name); | ||
282 | if (i < DYNAMIC_MINORS && i>0) { | 269 | if (i < DYNAMIC_MINORS && i>0) { |
283 | misc_minors[i>>3] &= ~(1 << (misc->minor & 7)); | 270 | misc_minors[i>>3] &= ~(1 << (misc->minor & 7)); |
284 | } | 271 | } |
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c index d65b3109318a..95e8122b8068 100644 --- a/drivers/char/mmtimer.c +++ b/drivers/char/mmtimer.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
28 | #include <linux/devfs_fs_kernel.h> | ||
29 | #include <linux/mmtimer.h> | 28 | #include <linux/mmtimer.h> |
30 | #include <linux/miscdevice.h> | 29 | #include <linux/miscdevice.h> |
31 | #include <linux/posix-timers.h> | 30 | #include <linux/posix-timers.h> |
@@ -694,7 +693,6 @@ static int __init mmtimer_init(void) | |||
694 | return -1; | 693 | return -1; |
695 | } | 694 | } |
696 | 695 | ||
697 | strcpy(mmtimer_miscdev.devfs_name, MMTIMER_NAME); | ||
698 | if (misc_register(&mmtimer_miscdev)) { | 696 | if (misc_register(&mmtimer_miscdev)) { |
699 | printk(KERN_ERR "%s: failed to register device\n", | 697 | printk(KERN_ERR "%s: failed to register device\n", |
700 | MMTIMER_NAME); | 698 | MMTIMER_NAME); |
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 01247cccb89f..52ef61f54ba0 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c | |||
@@ -342,7 +342,6 @@ static int __init moxa_init(void) | |||
342 | init_MUTEX(&moxaBuffSem); | 342 | init_MUTEX(&moxaBuffSem); |
343 | moxaDriver->owner = THIS_MODULE; | 343 | moxaDriver->owner = THIS_MODULE; |
344 | moxaDriver->name = "ttyMX"; | 344 | moxaDriver->name = "ttyMX"; |
345 | moxaDriver->devfs_name = "tts/a"; | ||
346 | moxaDriver->major = ttymajor; | 345 | moxaDriver->major = ttymajor; |
347 | moxaDriver->minor_start = 0; | 346 | moxaDriver->minor_start = 0; |
348 | moxaDriver->type = TTY_DRIVER_TYPE_SERIAL; | 347 | moxaDriver->type = TTY_DRIVER_TYPE_SERIAL; |
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index bee6c47b45bd..24231d9743dc 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c | |||
@@ -60,7 +60,6 @@ | |||
60 | #include <linux/init.h> | 60 | #include <linux/init.h> |
61 | #include <linux/sched.h> | 61 | #include <linux/sched.h> |
62 | #include <linux/device.h> | 62 | #include <linux/device.h> |
63 | #include <linux/devfs_fs_kernel.h> | ||
64 | #include <linux/ioctl.h> | 63 | #include <linux/ioctl.h> |
65 | #include <linux/parport.h> | 64 | #include <linux/parport.h> |
66 | #include <linux/ctype.h> | 65 | #include <linux/ctype.h> |
@@ -770,7 +769,7 @@ static struct parport_driver pp_driver = { | |||
770 | 769 | ||
771 | static int __init ppdev_init (void) | 770 | static int __init ppdev_init (void) |
772 | { | 771 | { |
773 | int i, err = 0; | 772 | int err = 0; |
774 | 773 | ||
775 | if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) { | 774 | if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) { |
776 | printk (KERN_WARNING CHRDEV ": unable to get major %d\n", | 775 | printk (KERN_WARNING CHRDEV ": unable to get major %d\n", |
@@ -782,11 +781,6 @@ static int __init ppdev_init (void) | |||
782 | err = PTR_ERR(ppdev_class); | 781 | err = PTR_ERR(ppdev_class); |
783 | goto out_chrdev; | 782 | goto out_chrdev; |
784 | } | 783 | } |
785 | devfs_mk_dir("parports"); | ||
786 | for (i = 0; i < PARPORT_MAX; i++) { | ||
787 | devfs_mk_cdev(MKDEV(PP_MAJOR, i), | ||
788 | S_IFCHR | S_IRUGO | S_IWUGO, "parports/%d", i); | ||
789 | } | ||
790 | if (parport_register_driver(&pp_driver)) { | 784 | if (parport_register_driver(&pp_driver)) { |
791 | printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); | 785 | printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); |
792 | goto out_class; | 786 | goto out_class; |
@@ -796,9 +790,6 @@ static int __init ppdev_init (void) | |||
796 | goto out; | 790 | goto out; |
797 | 791 | ||
798 | out_class: | 792 | out_class: |
799 | for (i = 0; i < PARPORT_MAX; i++) | ||
800 | devfs_remove("parports/%d", i); | ||
801 | devfs_remove("parports"); | ||
802 | class_destroy(ppdev_class); | 793 | class_destroy(ppdev_class); |
803 | out_chrdev: | 794 | out_chrdev: |
804 | unregister_chrdev(PP_MAJOR, CHRDEV); | 795 | unregister_chrdev(PP_MAJOR, CHRDEV); |
@@ -808,12 +799,8 @@ out: | |||
808 | 799 | ||
809 | static void __exit ppdev_cleanup (void) | 800 | static void __exit ppdev_cleanup (void) |
810 | { | 801 | { |
811 | int i; | ||
812 | /* Clean up all parport stuff */ | 802 | /* Clean up all parport stuff */ |
813 | for (i = 0; i < PARPORT_MAX; i++) | ||
814 | devfs_remove("parports/%d", i); | ||
815 | parport_unregister_driver(&pp_driver); | 803 | parport_unregister_driver(&pp_driver); |
816 | devfs_remove("parports"); | ||
817 | class_destroy(ppdev_class); | 804 | class_destroy(ppdev_class); |
818 | unregister_chrdev (PP_MAJOR, CHRDEV); | 805 | unregister_chrdev (PP_MAJOR, CHRDEV); |
819 | } | 806 | } |
diff --git a/drivers/char/pty.c b/drivers/char/pty.c index 0c17f61549b4..9491e4307566 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/major.h> | 24 | #include <linux/major.h> |
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/devfs_fs_kernel.h> | ||
28 | #include <linux/sysctl.h> | 27 | #include <linux/sysctl.h> |
29 | 28 | ||
30 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
@@ -265,7 +264,6 @@ static void __init legacy_pty_init(void) | |||
265 | pty_driver->owner = THIS_MODULE; | 264 | pty_driver->owner = THIS_MODULE; |
266 | pty_driver->driver_name = "pty_master"; | 265 | pty_driver->driver_name = "pty_master"; |
267 | pty_driver->name = "pty"; | 266 | pty_driver->name = "pty"; |
268 | pty_driver->devfs_name = "pty/m"; | ||
269 | pty_driver->major = PTY_MASTER_MAJOR; | 267 | pty_driver->major = PTY_MASTER_MAJOR; |
270 | pty_driver->minor_start = 0; | 268 | pty_driver->minor_start = 0; |
271 | pty_driver->type = TTY_DRIVER_TYPE_PTY; | 269 | pty_driver->type = TTY_DRIVER_TYPE_PTY; |
@@ -283,7 +281,6 @@ static void __init legacy_pty_init(void) | |||
283 | pty_slave_driver->owner = THIS_MODULE; | 281 | pty_slave_driver->owner = THIS_MODULE; |
284 | pty_slave_driver->driver_name = "pty_slave"; | 282 | pty_slave_driver->driver_name = "pty_slave"; |
285 | pty_slave_driver->name = "ttyp"; | 283 | pty_slave_driver->name = "ttyp"; |
286 | pty_slave_driver->devfs_name = "pty/s"; | ||
287 | pty_slave_driver->major = PTY_SLAVE_MAJOR; | 284 | pty_slave_driver->major = PTY_SLAVE_MAJOR; |
288 | pty_slave_driver->minor_start = 0; | 285 | pty_slave_driver->minor_start = 0; |
289 | pty_slave_driver->type = TTY_DRIVER_TYPE_PTY; | 286 | pty_slave_driver->type = TTY_DRIVER_TYPE_PTY; |
@@ -351,7 +348,6 @@ static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file, | |||
351 | 348 | ||
352 | static void __init unix98_pty_init(void) | 349 | static void __init unix98_pty_init(void) |
353 | { | 350 | { |
354 | devfs_mk_dir("pts"); | ||
355 | ptm_driver = alloc_tty_driver(NR_UNIX98_PTY_MAX); | 351 | ptm_driver = alloc_tty_driver(NR_UNIX98_PTY_MAX); |
356 | if (!ptm_driver) | 352 | if (!ptm_driver) |
357 | panic("Couldn't allocate Unix98 ptm driver"); | 353 | panic("Couldn't allocate Unix98 ptm driver"); |
@@ -372,7 +368,7 @@ static void __init unix98_pty_init(void) | |||
372 | ptm_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; | 368 | ptm_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; |
373 | ptm_driver->init_termios.c_lflag = 0; | 369 | ptm_driver->init_termios.c_lflag = 0; |
374 | ptm_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | | 370 | ptm_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | |
375 | TTY_DRIVER_NO_DEVFS | TTY_DRIVER_DEVPTS_MEM; | 371 | TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM; |
376 | ptm_driver->other = pts_driver; | 372 | ptm_driver->other = pts_driver; |
377 | tty_set_operations(ptm_driver, &pty_ops); | 373 | tty_set_operations(ptm_driver, &pty_ops); |
378 | ptm_driver->ioctl = pty_unix98_ioctl; | 374 | ptm_driver->ioctl = pty_unix98_ioctl; |
@@ -387,7 +383,7 @@ static void __init unix98_pty_init(void) | |||
387 | pts_driver->init_termios = tty_std_termios; | 383 | pts_driver->init_termios = tty_std_termios; |
388 | pts_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; | 384 | pts_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; |
389 | pts_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | | 385 | pts_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | |
390 | TTY_DRIVER_NO_DEVFS | TTY_DRIVER_DEVPTS_MEM; | 386 | TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM; |
391 | pts_driver->other = ptm_driver; | 387 | pts_driver->other = ptm_driver; |
392 | tty_set_operations(pts_driver, &pty_ops); | 388 | tty_set_operations(pts_driver, &pty_ops); |
393 | 389 | ||
diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 15a7b4086524..9bf97c5e38c0 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
13 | #include <linux/devfs_fs_kernel.h> | ||
14 | #include <linux/major.h> | 13 | #include <linux/major.h> |
15 | #include <linux/blkdev.h> | 14 | #include <linux/blkdev.h> |
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
@@ -288,7 +287,6 @@ static struct cdev raw_cdev = { | |||
288 | 287 | ||
289 | static int __init raw_init(void) | 288 | static int __init raw_init(void) |
290 | { | 289 | { |
291 | int i; | ||
292 | dev_t dev = MKDEV(RAW_MAJOR, 0); | 290 | dev_t dev = MKDEV(RAW_MAJOR, 0); |
293 | 291 | ||
294 | if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw")) | 292 | if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw")) |
@@ -310,13 +308,6 @@ static int __init raw_init(void) | |||
310 | } | 308 | } |
311 | class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); | 309 | class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); |
312 | 310 | ||
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; | 311 | return 0; |
321 | 312 | ||
322 | error: | 313 | error: |
@@ -326,12 +317,6 @@ error: | |||
326 | 317 | ||
327 | static void __exit raw_exit(void) | 318 | static void __exit raw_exit(void) |
328 | { | 319 | { |
329 | int i; | ||
330 | |||
331 | for (i = 1; i < MAX_RAW_MINORS; i++) | ||
332 | devfs_remove("raw/raw%d", i); | ||
333 | devfs_remove("raw/rawctl"); | ||
334 | devfs_remove("raw"); | ||
335 | class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0)); | 320 | class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0)); |
336 | class_destroy(raw_class); | 321 | class_destroy(raw_class); |
337 | cdev_del(&raw_cdev); | 322 | cdev_del(&raw_cdev); |
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 657c0d88f48c..c84c3c3f10c3 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -1634,7 +1634,6 @@ static inline int rc_init_drivers(void) | |||
1634 | memset(IRQ_to_board, 0, sizeof(IRQ_to_board)); | 1634 | memset(IRQ_to_board, 0, sizeof(IRQ_to_board)); |
1635 | riscom_driver->owner = THIS_MODULE; | 1635 | riscom_driver->owner = THIS_MODULE; |
1636 | riscom_driver->name = "ttyL"; | 1636 | riscom_driver->name = "ttyL"; |
1637 | riscom_driver->devfs_name = "tts/L"; | ||
1638 | riscom_driver->major = RISCOM8_NORMAL_MAJOR; | 1637 | riscom_driver->major = RISCOM8_NORMAL_MAJOR; |
1639 | riscom_driver->type = TTY_DRIVER_TYPE_SERIAL; | 1638 | riscom_driver->type = TTY_DRIVER_TYPE_SERIAL; |
1640 | riscom_driver->subtype = SERIAL_TYPE_NORMAL; | 1639 | riscom_driver->subtype = SERIAL_TYPE_NORMAL; |
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 0708c5164c83..0ac131881322 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c | |||
@@ -2426,8 +2426,7 @@ static int __init rp_init(void) | |||
2426 | */ | 2426 | */ |
2427 | 2427 | ||
2428 | rocket_driver->owner = THIS_MODULE; | 2428 | rocket_driver->owner = THIS_MODULE; |
2429 | rocket_driver->flags = TTY_DRIVER_NO_DEVFS; | 2429 | rocket_driver->flags = TTY_DRIVER_DYNAMIC_DEV; |
2430 | rocket_driver->devfs_name = "tts/R"; | ||
2431 | rocket_driver->name = "ttyR"; | 2430 | rocket_driver->name = "ttyR"; |
2432 | rocket_driver->driver_name = "Comtrol RocketPort"; | 2431 | rocket_driver->driver_name = "Comtrol RocketPort"; |
2433 | rocket_driver->major = TTY_ROCKET_MAJOR; | 2432 | rocket_driver->major = TTY_ROCKET_MAJOR; |
@@ -2438,7 +2437,7 @@ static int __init rp_init(void) | |||
2438 | rocket_driver->init_termios.c_cflag = | 2437 | rocket_driver->init_termios.c_cflag = |
2439 | B9600 | CS8 | CREAD | HUPCL | CLOCAL; | 2438 | B9600 | CS8 | CREAD | HUPCL | CLOCAL; |
2440 | #ifdef ROCKET_SOFT_FLOW | 2439 | #ifdef ROCKET_SOFT_FLOW |
2441 | rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; | 2440 | rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; |
2442 | #endif | 2441 | #endif |
2443 | tty_set_operations(rocket_driver, &rocket_ops); | 2442 | tty_set_operations(rocket_driver, &rocket_ops); |
2444 | 2443 | ||
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index 037c940ac71b..c851eeaa4069 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c | |||
@@ -2235,7 +2235,6 @@ scrn[1] = '\0'; | |||
2235 | /* Initialize the tty_driver structure */ | 2235 | /* Initialize the tty_driver structure */ |
2236 | 2236 | ||
2237 | cy_serial_driver->owner = THIS_MODULE; | 2237 | cy_serial_driver->owner = THIS_MODULE; |
2238 | cy_serial_driver->devfs_name = "tts/"; | ||
2239 | cy_serial_driver->name = "ttyS"; | 2238 | cy_serial_driver->name = "ttyS"; |
2240 | cy_serial_driver->major = TTY_MAJOR; | 2239 | cy_serial_driver->major = TTY_MAJOR; |
2241 | cy_serial_driver->minor_start = 64; | 2240 | cy_serial_driver->minor_start = 64; |
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 00b4a2187164..0f7a542d9041 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/ioport.h> | 40 | #include <linux/ioport.h> |
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/smp_lock.h> | 42 | #include <linux/smp_lock.h> |
43 | #include <linux/devfs_fs_kernel.h> | ||
44 | #include <linux/device.h> | 43 | #include <linux/device.h> |
45 | #include <linux/delay.h> | 44 | #include <linux/delay.h> |
46 | 45 | ||
@@ -757,11 +756,8 @@ static void __exit stallion_module_exit(void) | |||
757 | "errno=%d\n", -i); | 756 | "errno=%d\n", -i); |
758 | return; | 757 | return; |
759 | } | 758 | } |
760 | for (i = 0; i < 4; i++) { | 759 | for (i = 0; i < 4; i++) |
761 | devfs_remove("staliomem/%d", i); | ||
762 | class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); | 760 | class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); |
763 | } | ||
764 | devfs_remove("staliomem"); | ||
765 | if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) | 761 | if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) |
766 | printk("STALLION: failed to un-register serial memory device, " | 762 | printk("STALLION: failed to un-register serial memory device, " |
767 | "errno=%d\n", -i); | 763 | "errno=%d\n", -i); |
@@ -3044,22 +3040,16 @@ static int __init stl_init(void) | |||
3044 | */ | 3040 | */ |
3045 | if (register_chrdev(STL_SIOMEMMAJOR, "staliomem", &stl_fsiomem)) | 3041 | if (register_chrdev(STL_SIOMEMMAJOR, "staliomem", &stl_fsiomem)) |
3046 | printk("STALLION: failed to register serial board device\n"); | 3042 | printk("STALLION: failed to register serial board device\n"); |
3047 | devfs_mk_dir("staliomem"); | ||
3048 | 3043 | ||
3049 | stallion_class = class_create(THIS_MODULE, "staliomem"); | 3044 | stallion_class = class_create(THIS_MODULE, "staliomem"); |
3050 | for (i = 0; i < 4; i++) { | 3045 | for (i = 0; i < 4; i++) |
3051 | devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), | ||
3052 | S_IFCHR|S_IRUSR|S_IWUSR, | ||
3053 | "staliomem/%d", i); | ||
3054 | class_device_create(stallion_class, NULL, | 3046 | class_device_create(stallion_class, NULL, |
3055 | MKDEV(STL_SIOMEMMAJOR, i), NULL, | 3047 | MKDEV(STL_SIOMEMMAJOR, i), NULL, |
3056 | "staliomem%d", i); | 3048 | "staliomem%d", i); |
3057 | } | ||
3058 | 3049 | ||
3059 | stl_serial->owner = THIS_MODULE; | 3050 | stl_serial->owner = THIS_MODULE; |
3060 | stl_serial->driver_name = stl_drvname; | 3051 | stl_serial->driver_name = stl_drvname; |
3061 | stl_serial->name = "ttyE"; | 3052 | stl_serial->name = "ttyE"; |
3062 | stl_serial->devfs_name = "tts/E"; | ||
3063 | stl_serial->major = STL_SERIALMAJOR; | 3053 | stl_serial->major = STL_SERIALMAJOR; |
3064 | stl_serial->minor_start = 0; | 3054 | stl_serial->minor_start = 0; |
3065 | stl_serial->type = TTY_DRIVER_TYPE_SERIAL; | 3055 | stl_serial->type = TTY_DRIVER_TYPE_SERIAL; |
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c index 079db5a935a1..f7802e5bd7ca 100644 --- a/drivers/char/tipar.c +++ b/drivers/char/tipar.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #include <linux/ioport.h> | 56 | #include <linux/ioport.h> |
57 | #include <asm/io.h> | 57 | #include <asm/io.h> |
58 | #include <linux/bitops.h> | 58 | #include <linux/bitops.h> |
59 | #include <linux/devfs_fs_kernel.h> /* DevFs support */ | ||
60 | #include <linux/parport.h> /* Our code depend on parport */ | 59 | #include <linux/parport.h> /* Our code depend on parport */ |
61 | #include <linux/device.h> | 60 | #include <linux/device.h> |
62 | 61 | ||
@@ -443,12 +442,6 @@ tipar_register(int nr, struct parport *port) | |||
443 | 442 | ||
444 | class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR, | 443 | class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR, |
445 | TIPAR_MINOR + nr), NULL, "par%d", nr); | 444 | 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 | 445 | ||
453 | /* Display informations */ | 446 | /* Display informations */ |
454 | pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == | 447 | pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == |
@@ -460,11 +453,7 @@ tipar_register(int nr, struct parport *port) | |||
460 | pr_info("tipar%d: link cable not found\n", nr); | 453 | pr_info("tipar%d: link cable not found\n", nr); |
461 | 454 | ||
462 | err = 0; | 455 | err = 0; |
463 | goto out; | ||
464 | 456 | ||
465 | out_class: | ||
466 | class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr)); | ||
467 | class_destroy(tipar_class); | ||
468 | out: | 457 | out: |
469 | return err; | 458 | return err; |
470 | } | 459 | } |
@@ -507,9 +496,6 @@ tipar_init_module(void) | |||
507 | goto out; | 496 | goto out; |
508 | } | 497 | } |
509 | 498 | ||
510 | /* Use devfs with tree: /dev/ticables/par/[0..2] */ | ||
511 | devfs_mk_dir("ticables/par"); | ||
512 | |||
513 | tipar_class = class_create(THIS_MODULE, "ticables"); | 499 | tipar_class = class_create(THIS_MODULE, "ticables"); |
514 | if (IS_ERR(tipar_class)) { | 500 | if (IS_ERR(tipar_class)) { |
515 | err = PTR_ERR(tipar_class); | 501 | err = PTR_ERR(tipar_class); |
@@ -528,7 +514,6 @@ out_class: | |||
528 | class_destroy(tipar_class); | 514 | class_destroy(tipar_class); |
529 | 515 | ||
530 | out_chrdev: | 516 | out_chrdev: |
531 | devfs_remove("ticables/par"); | ||
532 | unregister_chrdev(TIPAR_MAJOR, "tipar"); | 517 | unregister_chrdev(TIPAR_MAJOR, "tipar"); |
533 | out: | 518 | out: |
534 | return err; | 519 | return err; |
@@ -549,10 +534,8 @@ tipar_cleanup_module(void) | |||
549 | continue; | 534 | continue; |
550 | parport_unregister_device(table[i].dev); | 535 | parport_unregister_device(table[i].dev); |
551 | class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); | 536 | class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); |
552 | devfs_remove("ticables/par/%d", i); | ||
553 | } | 537 | } |
554 | class_destroy(tipar_class); | 538 | class_destroy(tipar_class); |
555 | devfs_remove("ticables/par"); | ||
556 | 539 | ||
557 | pr_info("tipar: module unloaded\n"); | 540 | pr_info("tipar: module unloaded\n"); |
558 | } | 541 | } |
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 8d19f7281f0b..a1143238feca 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -102,7 +102,6 @@ | |||
102 | #include <linux/kbd_kern.h> | 102 | #include <linux/kbd_kern.h> |
103 | #include <linux/vt_kern.h> | 103 | #include <linux/vt_kern.h> |
104 | #include <linux/selection.h> | 104 | #include <linux/selection.h> |
105 | #include <linux/devfs_fs_kernel.h> | ||
106 | 105 | ||
107 | #include <linux/kmod.h> | 106 | #include <linux/kmod.h> |
108 | 107 | ||
@@ -2955,8 +2954,8 @@ static struct class *tty_class; | |||
2955 | * Returns a pointer to the class device (or ERR_PTR(-EFOO) on error). | 2954 | * Returns a pointer to the class device (or ERR_PTR(-EFOO) on error). |
2956 | * | 2955 | * |
2957 | * This call is required to be made to register an individual tty device if | 2956 | * This call is required to be made to register an individual tty device if |
2958 | * the tty driver's flags have the TTY_DRIVER_NO_DEVFS bit set. If that | 2957 | * the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set. If that |
2959 | * bit is not set, this function should not be called. | 2958 | * bit is not set, this function should not be called by a tty driver. |
2960 | */ | 2959 | */ |
2961 | struct class_device *tty_register_device(struct tty_driver *driver, | 2960 | struct class_device *tty_register_device(struct tty_driver *driver, |
2962 | unsigned index, struct device *device) | 2961 | unsigned index, struct device *device) |
@@ -2970,9 +2969,6 @@ struct class_device *tty_register_device(struct tty_driver *driver, | |||
2970 | return ERR_PTR(-EINVAL); | 2969 | return ERR_PTR(-EINVAL); |
2971 | } | 2970 | } |
2972 | 2971 | ||
2973 | devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, | ||
2974 | "%s%d", driver->devfs_name, index + driver->name_base); | ||
2975 | |||
2976 | if (driver->type == TTY_DRIVER_TYPE_PTY) | 2972 | if (driver->type == TTY_DRIVER_TYPE_PTY) |
2977 | pty_line_name(driver, index, name); | 2973 | pty_line_name(driver, index, name); |
2978 | else | 2974 | else |
@@ -2991,7 +2987,6 @@ struct class_device *tty_register_device(struct tty_driver *driver, | |||
2991 | */ | 2987 | */ |
2992 | void tty_unregister_device(struct tty_driver *driver, unsigned index) | 2988 | void tty_unregister_device(struct tty_driver *driver, unsigned index) |
2993 | { | 2989 | { |
2994 | devfs_remove("%s%d", driver->devfs_name, index + driver->name_base); | ||
2995 | class_device_destroy(tty_class, MKDEV(driver->major, driver->minor_start) + index); | 2990 | class_device_destroy(tty_class, MKDEV(driver->major, driver->minor_start) + index); |
2996 | } | 2991 | } |
2997 | 2992 | ||
@@ -3113,7 +3108,7 @@ int tty_register_driver(struct tty_driver *driver) | |||
3113 | 3108 | ||
3114 | list_add(&driver->tty_drivers, &tty_drivers); | 3109 | list_add(&driver->tty_drivers, &tty_drivers); |
3115 | 3110 | ||
3116 | if ( !(driver->flags & TTY_DRIVER_NO_DEVFS) ) { | 3111 | if ( !(driver->flags & TTY_DRIVER_DYNAMIC_DEV) ) { |
3117 | for(i = 0; i < driver->num; i++) | 3112 | for(i = 0; i < driver->num; i++) |
3118 | tty_register_device(driver, i, NULL); | 3113 | tty_register_device(driver, i, NULL); |
3119 | } | 3114 | } |
@@ -3156,7 +3151,7 @@ int tty_unregister_driver(struct tty_driver *driver) | |||
3156 | driver->termios_locked[i] = NULL; | 3151 | driver->termios_locked[i] = NULL; |
3157 | kfree(tp); | 3152 | kfree(tp); |
3158 | } | 3153 | } |
3159 | if (!(driver->flags & TTY_DRIVER_NO_DEVFS)) | 3154 | if (!(driver->flags & TTY_DRIVER_DYNAMIC_DEV)) |
3160 | tty_unregister_device(driver, i); | 3155 | tty_unregister_device(driver, i); |
3161 | } | 3156 | } |
3162 | p = driver->ttys; | 3157 | p = driver->ttys; |
@@ -3232,14 +3227,12 @@ static int __init tty_init(void) | |||
3232 | if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || | 3227 | if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || |
3233 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) | 3228 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) |
3234 | panic("Couldn't register /dev/tty driver\n"); | 3229 | panic("Couldn't register /dev/tty driver\n"); |
3235 | devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty"); | ||
3236 | class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); | 3230 | class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); |
3237 | 3231 | ||
3238 | cdev_init(&console_cdev, &console_fops); | 3232 | cdev_init(&console_cdev, &console_fops); |
3239 | if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || | 3233 | if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || |
3240 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) | 3234 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) |
3241 | panic("Couldn't register /dev/console driver\n"); | 3235 | panic("Couldn't register /dev/console driver\n"); |
3242 | devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console"); | ||
3243 | class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); | 3236 | class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); |
3244 | 3237 | ||
3245 | #ifdef CONFIG_UNIX98_PTYS | 3238 | #ifdef CONFIG_UNIX98_PTYS |
@@ -3247,7 +3240,6 @@ static int __init tty_init(void) | |||
3247 | if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || | 3240 | if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || |
3248 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) | 3241 | register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) |
3249 | panic("Couldn't register /dev/ptmx driver\n"); | 3242 | panic("Couldn't register /dev/ptmx driver\n"); |
3250 | devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx"); | ||
3251 | class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); | 3243 | class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); |
3252 | #endif | 3244 | #endif |
3253 | 3245 | ||
@@ -3256,7 +3248,6 @@ static int __init tty_init(void) | |||
3256 | if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || | 3248 | if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || |
3257 | register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) | 3249 | register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) |
3258 | panic("Couldn't register /dev/tty0 driver\n"); | 3250 | panic("Couldn't register /dev/tty0 driver\n"); |
3259 | devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0"); | ||
3260 | class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); | 3251 | class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); |
3261 | 3252 | ||
3262 | vty_init(); | 3253 | vty_init(); |
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index 3c1dafaa3441..234d7f3fb114 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/major.h> | 26 | #include <linux/major.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/tty.h> | 28 | #include <linux/tty.h> |
29 | #include <linux/devfs_fs_kernel.h> | ||
30 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
31 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
32 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
@@ -478,12 +477,6 @@ static struct class *vc_class; | |||
478 | 477 | ||
479 | void vcs_make_devfs(struct tty_struct *tty) | 478 | void vcs_make_devfs(struct tty_struct *tty) |
480 | { | 479 | { |
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), | 480 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), |
488 | NULL, "vcs%u", tty->index + 1); | 481 | NULL, "vcs%u", tty->index + 1); |
489 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), | 482 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), |
@@ -491,8 +484,6 @@ void vcs_make_devfs(struct tty_struct *tty) | |||
491 | } | 484 | } |
492 | void vcs_remove_devfs(struct tty_struct *tty) | 485 | void vcs_remove_devfs(struct tty_struct *tty) |
493 | { | 486 | { |
494 | devfs_remove("vcc/%u", tty->index + 1); | ||
495 | devfs_remove("vcc/a%u", tty->index + 1); | ||
496 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); | 487 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); |
497 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); | 488 | class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); |
498 | } | 489 | } |
@@ -503,8 +494,6 @@ int __init vcs_init(void) | |||
503 | panic("unable to get major %d for vcs device", VCS_MAJOR); | 494 | panic("unable to get major %d for vcs device", VCS_MAJOR); |
504 | vc_class = class_create(THIS_MODULE, "vc"); | 495 | vc_class = class_create(THIS_MODULE, "vc"); |
505 | 496 | ||
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"); | 497 | 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"); | 498 | class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); |
510 | return 0; | 499 | return 0; |
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index 4e5360388748..07f5ce4b28e3 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c | |||
@@ -1152,7 +1152,6 @@ static int __init viocons_init2(void) | |||
1152 | viotty_driver = alloc_tty_driver(VTTY_PORTS); | 1152 | viotty_driver = alloc_tty_driver(VTTY_PORTS); |
1153 | viotty_driver->owner = THIS_MODULE; | 1153 | viotty_driver->owner = THIS_MODULE; |
1154 | viotty_driver->driver_name = "vioconsole"; | 1154 | viotty_driver->driver_name = "vioconsole"; |
1155 | viotty_driver->devfs_name = "vcs/"; | ||
1156 | viotty_driver->name = "tty"; | 1155 | viotty_driver->name = "tty"; |
1157 | viotty_driver->name_base = 1; | 1156 | viotty_driver->name_base = 1; |
1158 | viotty_driver->major = TTY_MAJOR; | 1157 | viotty_driver->major = TTY_MAJOR; |
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 11c7e9de5958..198f1505ae23 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <linux/dma-mapping.h> | 43 | #include <linux/dma-mapping.h> |
44 | #include <linux/fs.h> | 44 | #include <linux/fs.h> |
45 | #include <linux/cdev.h> | 45 | #include <linux/cdev.h> |
46 | #include <linux/devfs_fs_kernel.h> | ||
47 | #include <linux/major.h> | 46 | #include <linux/major.h> |
48 | #include <linux/completion.h> | 47 | #include <linux/completion.h> |
49 | #include <linux/proc_fs.h> | 48 | #include <linux/proc_fs.h> |
@@ -246,7 +245,6 @@ static struct device *tape_device[VIOTAPE_MAX_TAPE]; | |||
246 | */ | 245 | */ |
247 | static struct { | 246 | static struct { |
248 | unsigned char cur_part; | 247 | unsigned char cur_part; |
249 | int dev_handle; | ||
250 | unsigned char part_stat_rwi[MAX_PARTITIONS]; | 248 | unsigned char part_stat_rwi[MAX_PARTITIONS]; |
251 | } state[VIOTAPE_MAX_TAPE]; | 249 | } state[VIOTAPE_MAX_TAPE]; |
252 | 250 | ||
@@ -959,12 +957,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id) | |||
959 | "iseries!vt%d", i); | 957 | "iseries!vt%d", i); |
960 | class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), | 958 | class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), |
961 | NULL, "iseries!nvt%d", i); | 959 | NULL, "iseries!nvt%d", i); |
962 | devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, | ||
963 | "iseries/vt%d", i); | ||
964 | devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i | 0x80), | ||
965 | S_IFCHR | S_IRUSR | S_IWUSR, "iseries/nvt%d", i); | ||
966 | sprintf(tapename, "iseries/vt%d", i); | 960 | sprintf(tapename, "iseries/vt%d", i); |
967 | state[i].dev_handle = devfs_register_tape(tapename); | ||
968 | printk(VIOTAPE_KERN_INFO "tape %s is iSeries " | 961 | printk(VIOTAPE_KERN_INFO "tape %s is iSeries " |
969 | "resource %10.10s type %4.4s, model %3.3s\n", | 962 | "resource %10.10s type %4.4s, model %3.3s\n", |
970 | tapename, viotape_unitinfo[i].rsrcname, | 963 | tapename, viotape_unitinfo[i].rsrcname, |
@@ -976,9 +969,6 @@ static int viotape_remove(struct vio_dev *vdev) | |||
976 | { | 969 | { |
977 | int i = vdev->unit_address; | 970 | int i = vdev->unit_address; |
978 | 971 | ||
979 | devfs_remove("iseries/nvt%d", i); | ||
980 | devfs_remove("iseries/vt%d", i); | ||
981 | devfs_unregister_tape(state[i].dev_handle); | ||
982 | class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80)); | 972 | class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80)); |
983 | class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i)); | 973 | class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i)); |
984 | return 0; | 974 | return 0; |
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c index fd00822ac145..fe99fc1aba45 100644 --- a/drivers/char/vme_scc.c +++ b/drivers/char/vme_scc.c | |||
@@ -147,7 +147,6 @@ static int scc_init_drivers(void) | |||
147 | scc_driver->owner = THIS_MODULE; | 147 | scc_driver->owner = THIS_MODULE; |
148 | scc_driver->driver_name = "scc"; | 148 | scc_driver->driver_name = "scc"; |
149 | scc_driver->name = "ttyS"; | 149 | scc_driver->name = "ttyS"; |
150 | scc_driver->devfs_name = "tts/"; | ||
151 | scc_driver->major = TTY_MAJOR; | 150 | scc_driver->major = TTY_MAJOR; |
152 | scc_driver->minor_start = SCC_MINOR_BASE; | 151 | scc_driver->minor_start = SCC_MINOR_BASE; |
153 | scc_driver->type = TTY_DRIVER_TYPE_SERIAL; | 152 | scc_driver->type = TTY_DRIVER_TYPE_SERIAL; |
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 714d95ff2f1e..d6f65032649a 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -79,7 +79,6 @@ | |||
79 | #include <linux/mm.h> | 79 | #include <linux/mm.h> |
80 | #include <linux/console.h> | 80 | #include <linux/console.h> |
81 | #include <linux/init.h> | 81 | #include <linux/init.h> |
82 | #include <linux/devfs_fs_kernel.h> | ||
83 | #include <linux/vt_kern.h> | 82 | #include <linux/vt_kern.h> |
84 | #include <linux/selection.h> | 83 | #include <linux/selection.h> |
85 | #include <linux/tiocl.h> | 84 | #include <linux/tiocl.h> |
@@ -2663,7 +2662,6 @@ int __init vty_init(void) | |||
2663 | if (!console_driver) | 2662 | if (!console_driver) |
2664 | panic("Couldn't allocate console driver\n"); | 2663 | panic("Couldn't allocate console driver\n"); |
2665 | console_driver->owner = THIS_MODULE; | 2664 | console_driver->owner = THIS_MODULE; |
2666 | console_driver->devfs_name = "vc/"; | ||
2667 | console_driver->name = "tty"; | 2665 | console_driver->name = "tty"; |
2668 | console_driver->name_base = 1; | 2666 | console_driver->name_base = 1; |
2669 | console_driver->major = TTY_MAJOR; | 2667 | console_driver->major = TTY_MAJOR; |