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
commit8ab5e4c15b53e147c08031a959d9f776823dbe73 (patch)
treeb851d4c1fdbd396379279e4475f7f778a667a208 /drivers/char
parent7c69ef79741910883d5543caafa06aca3ebadbd1 (diff)
[PATCH] devfs: Remove devfs_remove() function from the kernel tree
Removes the devfs_remove() 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.c1
-rw-r--r--drivers/char/dtlk.c1
-rw-r--r--drivers/char/ftape/zftape/zftape-init.c6
-rw-r--r--drivers/char/ip2/ip2main.c3
-rw-r--r--drivers/char/ipmi/ipmi_devintf.c2
-rw-r--r--drivers/char/istallion.c5
-rw-r--r--drivers/char/lp.c3
-rw-r--r--drivers/char/misc.c1
-rw-r--r--drivers/char/ppdev.c9
-rw-r--r--drivers/char/raw.c6
-rw-r--r--drivers/char/stallion.c5
-rw-r--r--drivers/char/tipar.c3
-rw-r--r--drivers/char/tty_io.c1
-rw-r--r--drivers/char/vc_screen.c2
-rw-r--r--drivers/char/viotape.c2
15 files changed, 3 insertions, 47 deletions
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index 45caf778578c..ee32e58328aa 100644
--- a/drivers/char/dsp56k.c
+++ b/drivers/char/dsp56k.c
@@ -533,7 +533,6 @@ static void __exit dsp56k_cleanup_driver(void)
533 class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); 533 class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0));
534 class_destroy(dsp56k_class); 534 class_destroy(dsp56k_class);
535 unregister_chrdev(DSP56K_MAJOR, "dsp56k"); 535 unregister_chrdev(DSP56K_MAJOR, "dsp56k");
536 devfs_remove("dsp56k");
537} 536}
538module_exit(dsp56k_cleanup_driver); 537module_exit(dsp56k_cleanup_driver);
539 538
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index e34b4f4d1c27..6da88e292dce 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -354,7 +354,6 @@ static void __exit dtlk_cleanup (void)
354 354
355 dtlk_write_tts(DTLK_CLEAR); 355 dtlk_write_tts(DTLK_CLEAR);
356 unregister_chrdev(dtlk_major, "dtlk"); 356 unregister_chrdev(dtlk_major, "dtlk");
357 devfs_remove("dtlk");
358 release_region(dtlk_port_lpc, DTLK_IO_EXTENT); 357 release_region(dtlk_port_lpc, DTLK_IO_EXTENT);
359} 358}
360 359
diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c
index 8c6090c3a421..e09ad2b100b5 100644
--- a/drivers/char/ftape/zftape/zftape-init.c
+++ b/drivers/char/ftape/zftape/zftape-init.c
@@ -362,17 +362,11 @@ static void zft_exit(void)
362 TRACE(ft_t_info, "successful"); 362 TRACE(ft_t_info, "successful");
363 } 363 }
364 for (i = 0; i < 4; i++) { 364 for (i = 0; i < 4; i++) {
365 devfs_remove("qft%i", i);
366 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i)); 365 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i));
367 devfs_remove("nqft%i", i);
368 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4)); 366 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4));
369 devfs_remove("zqft%i", i);
370 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16)); 367 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16));
371 devfs_remove("nzqft%i", i);
372 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20)); 368 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20));
373 devfs_remove("rawqft%i", i);
374 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32)); 369 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32));
375 devfs_remove("nrawqft%i", i);
376 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36)); 370 class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36));
377 } 371 }
378 class_destroy(zft_class); 372 class_destroy(zft_class);
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index afc25db4975f..5d2d5732d82f 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -414,9 +414,7 @@ cleanup_module(void)
414 /* free io addresses and Tibet */ 414 /* free io addresses and Tibet */
415 release_region( ip2config.addr[i], 8 ); 415 release_region( ip2config.addr[i], 8 );
416 class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); 416 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)); 417 class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1));
419 devfs_remove("ip2/stat%d", i);
420 } 418 }
421 /* Disable and remove interrupt handler. */ 419 /* Disable and remove interrupt handler. */
422 if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) { 420 if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) {
@@ -425,7 +423,6 @@ cleanup_module(void)
425 } 423 }
426 } 424 }
427 class_destroy(ip2_class); 425 class_destroy(ip2_class);
428 devfs_remove("ip2");
429 if ( ( err = tty_unregister_driver ( ip2_tty_driver ) ) ) { 426 if ( ( err = tty_unregister_driver ( ip2_tty_driver ) ) ) {
430 printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err); 427 printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err);
431 } 428 }
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index ec22aba12be9..3103ed8e3adc 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -833,7 +833,6 @@ static void ipmi_smi_gone(int if_num)
833 } 833 }
834 class_device_destroy(ipmi_class, dev); 834 class_device_destroy(ipmi_class, dev);
835 mutex_unlock(&reg_list_mutex); 835 mutex_unlock(&reg_list_mutex);
836 devfs_remove("ipmidev/%d", if_num);
837} 836}
838 837
839static struct ipmi_smi_watcher smi_watcher = 838static struct ipmi_smi_watcher smi_watcher =
@@ -893,7 +892,6 @@ static __exit void cleanup_ipmi(void)
893 mutex_unlock(&reg_list_mutex); 892 mutex_unlock(&reg_list_mutex);
894 class_destroy(ipmi_class); 893 class_destroy(ipmi_class);
895 ipmi_smi_watcher_unregister(&smi_watcher); 894 ipmi_smi_watcher_unregister(&smi_watcher);
896 devfs_remove(DEVICE_NAME);
897 unregister_chrdev(ipmi_major, DEVICE_NAME); 895 unregister_chrdev(ipmi_major, DEVICE_NAME);
898} 896}
899module_exit(cleanup_ipmi); 897module_exit(cleanup_ipmi);
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 1395d4a5204e..0a5808e15b77 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -849,11 +849,8 @@ static void __exit istallion_module_exit(void)
849 return; 849 return;
850 } 850 }
851 put_tty_driver(stli_serial); 851 put_tty_driver(stli_serial);
852 for (i = 0; i < 4; i++) { 852 for (i = 0; i < 4; i++)
853 devfs_remove("staliomem/%d", i);
854 class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, i)); 853 class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, i));
855 }
856 devfs_remove("staliomem");
857 class_destroy(istallion_class); 854 class_destroy(istallion_class);
858 if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) 855 if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem")))
859 printk("STALLION: failed to un-register serial memory device, " 856 printk("STALLION: failed to un-register serial memory device, "
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index 1a08e8ea238f..530b19de4a30 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -930,7 +930,6 @@ static int __init lp_init (void)
930out_class: 930out_class:
931 class_destroy(lp_class); 931 class_destroy(lp_class);
932out_devfs: 932out_devfs:
933 devfs_remove("printers");
934 unregister_chrdev(LP_MAJOR, "lp"); 933 unregister_chrdev(LP_MAJOR, "lp");
935 return err; 934 return err;
936} 935}
@@ -978,10 +977,8 @@ static void lp_cleanup_module (void)
978 if (lp_table[offset].dev == NULL) 977 if (lp_table[offset].dev == NULL)
979 continue; 978 continue;
980 parport_unregister_device(lp_table[offset].dev); 979 parport_unregister_device(lp_table[offset].dev);
981 devfs_remove("printers/%d", offset);
982 class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); 980 class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset));
983 } 981 }
984 devfs_remove("printers");
985 class_destroy(lp_class); 982 class_destroy(lp_class);
986} 983}
987 984
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index 71e513771048..bf2e49e11cc0 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -271,7 +271,6 @@ int misc_deregister(struct miscdevice * misc)
271 down(&misc_sem); 271 down(&misc_sem);
272 list_del(&misc->list); 272 list_del(&misc->list);
273 class_device_destroy(misc_class, MKDEV(MISC_MAJOR, misc->minor)); 273 class_device_destroy(misc_class, MKDEV(MISC_MAJOR, misc->minor));
274 devfs_remove(misc->devfs_name);
275 if (i < DYNAMIC_MINORS && i>0) { 274 if (i < DYNAMIC_MINORS && i>0) {
276 misc_minors[i>>3] &= ~(1 << (misc->minor & 7)); 275 misc_minors[i>>3] &= ~(1 << (misc->minor & 7));
277 } 276 }
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index ba350799405c..c8a2eb1a558f 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -770,7 +770,7 @@ static struct parport_driver pp_driver = {
770 770
771static int __init ppdev_init (void) 771static int __init ppdev_init (void)
772{ 772{
773 int i, err = 0; 773 int err = 0;
774 774
775 if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) { 775 if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) {
776 printk (KERN_WARNING CHRDEV ": unable to get major %d\n", 776 printk (KERN_WARNING CHRDEV ": unable to get major %d\n",
@@ -791,9 +791,6 @@ static int __init ppdev_init (void)
791 goto out; 791 goto out;
792 792
793out_class: 793out_class:
794 for (i = 0; i < PARPORT_MAX; i++)
795 devfs_remove("parports/%d", i);
796 devfs_remove("parports");
797 class_destroy(ppdev_class); 794 class_destroy(ppdev_class);
798out_chrdev: 795out_chrdev:
799 unregister_chrdev(PP_MAJOR, CHRDEV); 796 unregister_chrdev(PP_MAJOR, CHRDEV);
@@ -803,12 +800,8 @@ out:
803 800
804static void __exit ppdev_cleanup (void) 801static void __exit ppdev_cleanup (void)
805{ 802{
806 int i;
807 /* Clean up all parport stuff */ 803 /* Clean up all parport stuff */
808 for (i = 0; i < PARPORT_MAX; i++)
809 devfs_remove("parports/%d", i);
810 parport_unregister_driver(&pp_driver); 804 parport_unregister_driver(&pp_driver);
811 devfs_remove("parports");
812 class_destroy(ppdev_class); 805 class_destroy(ppdev_class);
813 unregister_chrdev (PP_MAJOR, CHRDEV); 806 unregister_chrdev (PP_MAJOR, CHRDEV);
814} 807}
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index 72c8ee4c0069..941a17ab2196 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -318,12 +318,6 @@ error:
318 318
319static void __exit raw_exit(void) 319static void __exit raw_exit(void)
320{ 320{
321 int i;
322
323 for (i = 1; i < MAX_RAW_MINORS; i++)
324 devfs_remove("raw/raw%d", i);
325 devfs_remove("raw/rawctl");
326 devfs_remove("raw");
327 class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0)); 321 class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0));
328 class_destroy(raw_class); 322 class_destroy(raw_class);
329 cdev_del(&raw_cdev); 323 cdev_del(&raw_cdev);
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index a1a68f90d803..7840eb16f17a 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -773,11 +773,8 @@ static void __exit stallion_module_exit(void)
773 restore_flags(flags); 773 restore_flags(flags);
774 return; 774 return;
775 } 775 }
776 for (i = 0; i < 4; i++) { 776 for (i = 0; i < 4; i++)
777 devfs_remove("staliomem/%d", i);
778 class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); 777 class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));
779 }
780 devfs_remove("staliomem");
781 if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) 778 if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem")))
782 printk("STALLION: failed to un-register serial memory device, " 779 printk("STALLION: failed to un-register serial memory device, "
783 "errno=%d\n", -i); 780 "errno=%d\n", -i);
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c
index 0dc83a5bd4c1..48476f8fcda7 100644
--- a/drivers/char/tipar.c
+++ b/drivers/char/tipar.c
@@ -515,7 +515,6 @@ out_class:
515 class_destroy(tipar_class); 515 class_destroy(tipar_class);
516 516
517out_chrdev: 517out_chrdev:
518 devfs_remove("ticables/par");
519 unregister_chrdev(TIPAR_MAJOR, "tipar"); 518 unregister_chrdev(TIPAR_MAJOR, "tipar");
520out: 519out:
521 return err; 520 return err;
@@ -536,10 +535,8 @@ tipar_cleanup_module(void)
536 continue; 535 continue;
537 parport_unregister_device(table[i].dev); 536 parport_unregister_device(table[i].dev);
538 class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); 537 class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i));
539 devfs_remove("ticables/par/%d", i);
540 } 538 }
541 class_destroy(tipar_class); 539 class_destroy(tipar_class);
542 devfs_remove("ticables/par");
543 540
544 pr_info("tipar: module unloaded\n"); 541 pr_info("tipar: module unloaded\n");
545} 542}
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 0b9a33c0f1bd..b8e03a31a502 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2997,7 +2997,6 @@ struct class_device *tty_register_device(struct tty_driver *driver,
2997 */ 2997 */
2998void tty_unregister_device(struct tty_driver *driver, unsigned index) 2998void tty_unregister_device(struct tty_driver *driver, unsigned index)
2999{ 2999{
3000 devfs_remove("%s%d", driver->devfs_name, index + driver->name_base);
3001 class_device_destroy(tty_class, MKDEV(driver->major, driver->minor_start) + index); 3000 class_device_destroy(tty_class, MKDEV(driver->major, driver->minor_start) + index);
3002} 3001}
3003 3002
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index 1633d8206524..2266fbad62c4 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -485,8 +485,6 @@ void vcs_make_devfs(struct tty_struct *tty)
485} 485}
486void vcs_remove_devfs(struct tty_struct *tty) 486void vcs_remove_devfs(struct tty_struct *tty)
487{ 487{
488 devfs_remove("vcc/%u", tty->index + 1);
489 devfs_remove("vcc/a%u", tty->index + 1);
490 class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); 488 class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1));
491 class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); 489 class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129));
492} 490}
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index 4c1a128fd77b..b101134a8443 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -970,8 +970,6 @@ static int viotape_remove(struct vio_dev *vdev)
970{ 970{
971 int i = vdev->unit_address; 971 int i = vdev->unit_address;
972 972
973 devfs_remove("iseries/nvt%d", i);
974 devfs_remove("iseries/vt%d", i);
975 class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80)); 973 class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80));
976 class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i)); 974 class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i));
977 return 0; 975 return 0;