aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc64/solaris/socksys.c1
-rw-r--r--drivers/block/acsi_slm.c4
-rw-r--r--drivers/block/cpqarray.c2
-rw-r--r--drivers/block/floppy.c33
-rw-r--r--drivers/block/loop.c2
-rw-r--r--drivers/block/nbd.c1
-rw-r--r--drivers/block/paride/pg.c5
-rw-r--r--drivers/block/paride/pt.c3
-rw-r--r--drivers/block/rd.c1
-rw-r--r--drivers/block/sx8.c1
-rw-r--r--drivers/block/ub.c2
-rw-r--r--drivers/cdrom/sbpcd.c2
-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
-rw-r--r--drivers/isdn/capi/capi.c1
-rw-r--r--drivers/isdn/hardware/eicon/divamnt.c1
-rw-r--r--drivers/isdn/hardware/eicon/divasi.c1
-rw-r--r--drivers/isdn/hardware/eicon/divasmain.c1
-rw-r--r--drivers/md/dm-ioctl.c13
-rw-r--r--drivers/md/md.c8
-rw-r--r--drivers/media/dvb/dvb-core/dvbdev.c6
-rw-r--r--drivers/media/video/videodev.c1
-rw-r--r--drivers/mmc/mmc_block.c1
-rw-r--r--drivers/net/ppp_generic.c1
-rw-r--r--drivers/net/wan/cosa.c5
-rw-r--r--drivers/s390/block/dasd.c1
-rw-r--r--drivers/s390/block/xpram.c2
-rw-r--r--drivers/sbus/char/bpp.c3
-rw-r--r--drivers/sbus/char/vfc_dev.c2
-rw-r--r--drivers/telephony/phonedev.c1
-rw-r--r--drivers/video/fbmem.c1
-rw-r--r--fs/coda/psdev.c10
-rw-r--r--fs/partitions/check.c1
-rw-r--r--include/linux/devfs_fs_kernel.h3
47 files changed, 9 insertions, 161 deletions
diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c
index 30ba11682cae..09664ab124ec 100644
--- a/arch/sparc64/solaris/socksys.c
+++ b/arch/sparc64/solaris/socksys.c
@@ -205,5 +205,4 @@ cleanup_socksys(void)
205{ 205{
206 if (unregister_chrdev(30, "socksys")) 206 if (unregister_chrdev(30, "socksys"))
207 printk ("Couldn't unregister socksys character device\n"); 207 printk ("Couldn't unregister socksys character device\n");
208 devfs_remove ("socksys");
209} 208}
diff --git a/drivers/block/acsi_slm.c b/drivers/block/acsi_slm.c
index b087b3a6f06f..7495fef24183 100644
--- a/drivers/block/acsi_slm.c
+++ b/drivers/block/acsi_slm.c
@@ -1027,10 +1027,6 @@ int init_module(void)
1027 1027
1028void cleanup_module(void) 1028void cleanup_module(void)
1029{ 1029{
1030 int i;
1031 for (i = 0; i < MAX_SLM; i++)
1032 devfs_remove("slm/%d", i);
1033 devfs_remove("slm");
1034 if (unregister_chrdev( ACSI_MAJOR, "slm" ) != 0) 1030 if (unregister_chrdev( ACSI_MAJOR, "slm" ) != 0)
1035 printk( KERN_ERR "acsi_slm: cleanup_module failed\n"); 1031 printk( KERN_ERR "acsi_slm: cleanup_module failed\n");
1036 atari_stram_free( SLMBuffer ); 1032 atari_stram_free( SLMBuffer );
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 5eb6fb7b5cfa..2701ed734b24 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -348,7 +348,6 @@ static void __devexit cpqarray_remove_one(int i)
348 for(j = 0; j < NWD; j++) { 348 for(j = 0; j < NWD; j++) {
349 if (ida_gendisk[i][j]->flags & GENHD_FL_UP) 349 if (ida_gendisk[i][j]->flags & GENHD_FL_UP)
350 del_gendisk(ida_gendisk[i][j]); 350 del_gendisk(ida_gendisk[i][j]);
351 devfs_remove("ida/c%dd%d",i,j);
352 put_disk(ida_gendisk[i][j]); 351 put_disk(ida_gendisk[i][j]);
353 } 352 }
354 blk_cleanup_queue(hba[i]->queue); 353 blk_cleanup_queue(hba[i]->queue);
@@ -1844,7 +1843,6 @@ static void __exit cpqarray_exit(void)
1844 } 1843 }
1845 } 1844 }
1846 1845
1847 devfs_remove("ida");
1848 remove_proc_entry("cpqarray", proc_root_driver); 1846 remove_proc_entry("cpqarray", proc_root_driver);
1849} 1847}
1850 1848
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index ec14e6e6bccb..8e101a9655ba 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3952,20 +3952,6 @@ static struct block_device_operations floppy_fops = {
3952 .media_changed = check_floppy_change, 3952 .media_changed = check_floppy_change,
3953 .revalidate_disk = floppy_revalidate, 3953 .revalidate_disk = floppy_revalidate,
3954}; 3954};
3955static char *table[] = {
3956 "", "d360", "h1200", "u360", "u720", "h360", "h720",
3957 "u1440", "u2880", "CompaQ", "h1440", "u1680", "h410",
3958 "u820", "h1476", "u1722", "h420", "u830", "h1494", "u1743",
3959 "h880", "u1040", "u1120", "h1600", "u1760", "u1920",
3960 "u3200", "u3520", "u3840", "u1840", "u800", "u1600",
3961 NULL
3962};
3963static int t360[] = { 1, 0 },
3964 t1200[] = { 2, 5, 6, 10, 12, 14, 16, 18, 20, 23, 0 },
3965 t3in[] = { 8, 9, 26, 27, 28, 7, 11, 15, 19, 24, 25, 29, 31, 3, 4, 13,
3966 17, 21, 22, 30, 0 };
3967static int *table_sup[] =
3968 { NULL, t360, t1200, t3in + 5 + 8, t3in + 5, t3in, t3in };
3969 3955
3970/* 3956/*
3971 * Floppy Driver initialization 3957 * Floppy Driver initialization
@@ -4244,7 +4230,7 @@ static int __init floppy_init(void)
4244 4230
4245 err = register_blkdev(FLOPPY_MAJOR, "fd"); 4231 err = register_blkdev(FLOPPY_MAJOR, "fd");
4246 if (err) 4232 if (err)
4247 goto out_devfs_remove; 4233 goto out_put_disk;
4248 4234
4249 floppy_queue = blk_init_queue(do_fd_request, &floppy_lock); 4235 floppy_queue = blk_init_queue(do_fd_request, &floppy_lock);
4250 if (!floppy_queue) { 4236 if (!floppy_queue) {
@@ -4403,8 +4389,6 @@ out_unreg_region:
4403 blk_cleanup_queue(floppy_queue); 4389 blk_cleanup_queue(floppy_queue);
4404out_unreg_blkdev: 4390out_unreg_blkdev:
4405 unregister_blkdev(FLOPPY_MAJOR, "fd"); 4391 unregister_blkdev(FLOPPY_MAJOR, "fd");
4406out_devfs_remove:
4407 devfs_remove("floppy");
4408out_put_disk: 4392out_put_disk:
4409 while (dr--) { 4393 while (dr--) {
4410 del_timer(&motor_off_timer[dr]); 4394 del_timer(&motor_off_timer[dr]);
@@ -4565,19 +4549,6 @@ static void floppy_release_irq_and_dma(void)
4565 4549
4566static char *floppy; 4550static char *floppy;
4567 4551
4568static void unregister_devfs_entries(int drive)
4569{
4570 int i;
4571
4572 if (UDP->cmos < ARRAY_SIZE(default_drive_params)) {
4573 i = 0;
4574 do {
4575 devfs_remove("floppy/%d%s", drive,
4576 table[table_sup[UDP->cmos][i]]);
4577 } while (table_sup[UDP->cmos][i++]);
4578 }
4579}
4580
4581static void __init parse_floppy_cfg_string(char *cfg) 4552static void __init parse_floppy_cfg_string(char *cfg)
4582{ 4553{
4583 char *ptr; 4554 char *ptr;
@@ -4614,13 +4585,11 @@ void cleanup_module(void)
4614 if ((allowed_drive_mask & (1 << drive)) && 4585 if ((allowed_drive_mask & (1 << drive)) &&
4615 fdc_state[FDC(drive)].version != FDC_NONE) { 4586 fdc_state[FDC(drive)].version != FDC_NONE) {
4616 del_gendisk(disks[drive]); 4587 del_gendisk(disks[drive]);
4617 unregister_devfs_entries(drive);
4618 device_remove_file(&floppy_device[drive].dev, &dev_attr_cmos); 4588 device_remove_file(&floppy_device[drive].dev, &dev_attr_cmos);
4619 platform_device_unregister(&floppy_device[drive]); 4589 platform_device_unregister(&floppy_device[drive]);
4620 } 4590 }
4621 put_disk(disks[drive]); 4591 put_disk(disks[drive]);
4622 } 4592 }
4623 devfs_remove("floppy");
4624 4593
4625 del_timer_sync(&fd_timeout); 4594 del_timer_sync(&fd_timeout);
4626 del_timer_sync(&fd_timer); 4595 del_timer_sync(&fd_timer);
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index f650d20f2a17..0319b096b556 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1308,7 +1308,6 @@ static int __init loop_init(void)
1308out_mem4: 1308out_mem4:
1309 while (i--) 1309 while (i--)
1310 blk_cleanup_queue(loop_dev[i].lo_queue); 1310 blk_cleanup_queue(loop_dev[i].lo_queue);
1311 devfs_remove("loop");
1312 i = max_loop; 1311 i = max_loop;
1313out_mem3: 1312out_mem3:
1314 while (i--) 1313 while (i--)
@@ -1331,7 +1330,6 @@ static void loop_exit(void)
1331 blk_cleanup_queue(loop_dev[i].lo_queue); 1330 blk_cleanup_queue(loop_dev[i].lo_queue);
1332 put_disk(disks[i]); 1331 put_disk(disks[i]);
1333 } 1332 }
1334 devfs_remove("loop");
1335 if (unregister_blkdev(LOOP_MAJOR, "loop")) 1333 if (unregister_blkdev(LOOP_MAJOR, "loop"))
1336 printk(KERN_WARNING "loop: cannot unregister blkdev\n"); 1334 printk(KERN_WARNING "loop: cannot unregister blkdev\n");
1337 1335
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 618e258ca5d0..c24b349ae57b 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -685,7 +685,6 @@ static void __exit nbd_cleanup(void)
685 put_disk(disk); 685 put_disk(disk);
686 } 686 }
687 } 687 }
688 devfs_remove("nbd");
689 unregister_blkdev(NBD_MAJOR, "nbd"); 688 unregister_blkdev(NBD_MAJOR, "nbd");
690 printk(KERN_INFO "nbd: unregistered device at major %d\n", NBD_MAJOR); 689 printk(KERN_INFO "nbd: unregistered device at major %d\n", NBD_MAJOR);
691} 690}
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index 3d464f767eaf..e6f1614b69c3 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -695,13 +695,10 @@ static void __exit pg_exit(void)
695 695
696 for (unit = 0; unit < PG_UNITS; unit++) { 696 for (unit = 0; unit < PG_UNITS; unit++) {
697 struct pg *dev = &devices[unit]; 697 struct pg *dev = &devices[unit];
698 if (dev->present) { 698 if (dev->present)
699 class_device_destroy(pg_class, MKDEV(major, unit)); 699 class_device_destroy(pg_class, MKDEV(major, unit));
700 devfs_remove("pg/%u", unit);
701 }
702 } 700 }
703 class_destroy(pg_class); 701 class_destroy(pg_class);
704 devfs_remove("pg");
705 unregister_chrdev(major, name); 702 unregister_chrdev(major, name);
706 703
707 for (unit = 0; unit < PG_UNITS; unit++) { 704 for (unit = 0; unit < PG_UNITS; unit++) {
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
index c85bdcb384ae..ea12073c5fb1 100644
--- a/drivers/block/paride/pt.c
+++ b/drivers/block/paride/pt.c
@@ -992,12 +992,9 @@ static void __exit pt_exit(void)
992 for (unit = 0; unit < PT_UNITS; unit++) 992 for (unit = 0; unit < PT_UNITS; unit++)
993 if (pt[unit].present) { 993 if (pt[unit].present) {
994 class_device_destroy(pt_class, MKDEV(major, unit)); 994 class_device_destroy(pt_class, MKDEV(major, unit));
995 devfs_remove("pt/%d", unit);
996 class_device_destroy(pt_class, MKDEV(major, unit + 128)); 995 class_device_destroy(pt_class, MKDEV(major, unit + 128));
997 devfs_remove("pt/%dn", unit);
998 } 996 }
999 class_destroy(pt_class); 997 class_destroy(pt_class);
1000 devfs_remove("pt");
1001 unregister_chrdev(major, name); 998 unregister_chrdev(major, name);
1002 for (unit = 0; unit < PT_UNITS; unit++) 999 for (unit = 0; unit < PT_UNITS; unit++)
1003 if (pt[unit].present) 1000 if (pt[unit].present)
diff --git a/drivers/block/rd.c b/drivers/block/rd.c
index 67821a8c6210..acaa2abf05a2 100644
--- a/drivers/block/rd.c
+++ b/drivers/block/rd.c
@@ -412,7 +412,6 @@ static void __exit rd_cleanup(void)
412 put_disk(rd_disks[i]); 412 put_disk(rd_disks[i]);
413 blk_cleanup_queue(rd_queue[i]); 413 blk_cleanup_queue(rd_queue[i]);
414 } 414 }
415 devfs_remove("rd");
416 unregister_blkdev(RAMDISK_MAJOR, "ramdisk"); 415 unregister_blkdev(RAMDISK_MAJOR, "ramdisk");
417} 416}
418 417
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index 9fb3f51e574e..a366ea8c6a40 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -1736,7 +1736,6 @@ static void carm_remove_one (struct pci_dev *pdev)
1736 1736
1737 free_irq(pdev->irq, host); 1737 free_irq(pdev->irq, host);
1738 carm_free_disks(host); 1738 carm_free_disks(host);
1739 devfs_remove(DRV_NAME);
1740 unregister_blkdev(host->major, host->name); 1739 unregister_blkdev(host->major, host->name);
1741 if (host->major == 160) 1740 if (host->major == 160)
1742 clear_bit(0, &carm_major_alloc); 1741 clear_bit(0, &carm_major_alloc);
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 088e5ba15c24..b68abc9d4c1f 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -2453,7 +2453,6 @@ static int __init ub_init(void)
2453 return 0; 2453 return 0;
2454 2454
2455err_register: 2455err_register:
2456 devfs_remove(DEVFS_NAME);
2457 unregister_blkdev(UB_MAJOR, DRV_NAME); 2456 unregister_blkdev(UB_MAJOR, DRV_NAME);
2458err_regblkdev: 2457err_regblkdev:
2459 return rc; 2458 return rc;
@@ -2463,7 +2462,6 @@ static void __exit ub_exit(void)
2463{ 2462{
2464 usb_deregister(&ub_driver); 2463 usb_deregister(&ub_driver);
2465 2464
2466 devfs_remove(DEVFS_NAME);
2467 unregister_blkdev(UB_MAJOR, DRV_NAME); 2465 unregister_blkdev(UB_MAJOR, DRV_NAME);
2468 usb_usual_clear_present(USB_US_TYPE_UB); 2466 usb_usual_clear_present(USB_US_TYPE_UB);
2469} 2467}
diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c
index ee4499acf1a1..55cbd23fd9cd 100644
--- a/drivers/cdrom/sbpcd.c
+++ b/drivers/cdrom/sbpcd.c
@@ -5904,7 +5904,6 @@ static void sbpcd_exit(void)
5904 if (D_S[j].drv_id==-1) continue; 5904 if (D_S[j].drv_id==-1) continue;
5905 del_gendisk(D_S[j].disk); 5905 del_gendisk(D_S[j].disk);
5906 put_disk(D_S[j].disk); 5906 put_disk(D_S[j].disk);
5907 devfs_remove("sbp/c0t%d", j);
5908 vfree(D_S[j].sbp_buf); 5907 vfree(D_S[j].sbp_buf);
5909 if (D_S[j].sbp_audsiz>0) 5908 if (D_S[j].sbp_audsiz>0)
5910 vfree(D_S[j].aud_buf); 5909 vfree(D_S[j].aud_buf);
@@ -5915,7 +5914,6 @@ static void sbpcd_exit(void)
5915 } 5914 }
5916 vfree(D_S[j].sbpcd_infop); 5915 vfree(D_S[j].sbpcd_infop);
5917 } 5916 }
5918 devfs_remove("sbp");
5919 msg(DBG_INF, "%s module released.\n", major_name); 5917 msg(DBG_INF, "%s module released.\n", major_name);
5920} 5918}
5921 5919
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;
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 1c8fe77270ae..1200d1de1de7 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1550,7 +1550,6 @@ static void __exit capi_exit(void)
1550 class_device_destroy(capi_class, MKDEV(capi_major, 0)); 1550 class_device_destroy(capi_class, MKDEV(capi_major, 0));
1551 class_destroy(capi_class); 1551 class_destroy(capi_class);
1552 unregister_chrdev(capi_major, "capi20"); 1552 unregister_chrdev(capi_major, "capi20");
1553 devfs_remove("isdn/capi20");
1554 1553
1555#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE 1554#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
1556 capinc_tty_exit(); 1555 capinc_tty_exit();
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c
index 12465b3c2b4d..83841d16c35d 100644
--- a/drivers/isdn/hardware/eicon/divamnt.c
+++ b/drivers/isdn/hardware/eicon/divamnt.c
@@ -178,7 +178,6 @@ static struct file_operations divas_maint_fops = {
178 178
179static void divas_maint_unregister_chrdev(void) 179static void divas_maint_unregister_chrdev(void)
180{ 180{
181 devfs_remove(DEVNAME);
182 unregister_chrdev(major, DEVNAME); 181 unregister_chrdev(major, DEVNAME);
183} 182}
184 183
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c
index 2d80d94b5d0c..dcd5b650a000 100644
--- a/drivers/isdn/hardware/eicon/divasi.c
+++ b/drivers/isdn/hardware/eicon/divasi.c
@@ -145,7 +145,6 @@ static struct file_operations divas_idi_fops = {
145 145
146static void divas_idi_unregister_chrdev(void) 146static void divas_idi_unregister_chrdev(void)
147{ 147{
148 devfs_remove(DEVNAME);
149 unregister_chrdev(major, DEVNAME); 148 unregister_chrdev(major, DEVNAME);
150} 149}
151 150
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index 71b3e06cbe39..bbb7d8fc207c 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -678,7 +678,6 @@ static struct file_operations divas_fops = {
678 678
679static void divas_unregister_chrdev(void) 679static void divas_unregister_chrdev(void)
680{ 680{
681 devfs_remove(DEVNAME);
682 unregister_chrdev(major, DEVNAME); 681 unregister_chrdev(major, DEVNAME);
683} 682}
684 683
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 6e1b51d748ac..361d50b6469f 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -74,7 +74,6 @@ static int dm_hash_init(void)
74static void dm_hash_exit(void) 74static void dm_hash_exit(void)
75{ 75{
76 dm_hash_remove_all(0); 76 dm_hash_remove_all(0);
77 devfs_remove(DM_DIR);
78} 77}
79 78
80/*----------------------------------------------------------------- 79/*-----------------------------------------------------------------
@@ -171,15 +170,6 @@ static void free_cell(struct hash_cell *hc)
171} 170}
172 171
173/* 172/*
174 * devfs stuff.
175 */
176static int unregister_with_devfs(struct hash_cell *hc)
177{
178 devfs_remove(DM_DIR"/%s", hc->name);
179 return 0;
180}
181
182/*
183 * The kdev_t and uuid of a device can never change once it is 173 * The kdev_t and uuid of a device can never change once it is
184 * initially inserted. 174 * initially inserted.
185 */ 175 */
@@ -234,7 +224,6 @@ static void __hash_remove(struct hash_cell *hc)
234 /* remove from the dev hash */ 224 /* remove from the dev hash */
235 list_del(&hc->uuid_list); 225 list_del(&hc->uuid_list);
236 list_del(&hc->name_list); 226 list_del(&hc->name_list);
237 unregister_with_devfs(hc);
238 dm_set_mdptr(hc->md, NULL); 227 dm_set_mdptr(hc->md, NULL);
239 228
240 table = dm_get_table(hc->md); 229 table = dm_get_table(hc->md);
@@ -330,8 +319,6 @@ static int dm_hash_rename(const char *old, const char *new)
330 /* 319 /*
331 * rename and move the name cell. 320 * rename and move the name cell.
332 */ 321 */
333 unregister_with_devfs(hc);
334
335 list_del(&hc->name_list); 322 list_del(&hc->name_list);
336 old_name = hc->name; 323 old_name = hc->name;
337 hc->name = new_name; 324 hc->name = new_name;
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ee7320b4a30e..9fc2314b58d9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5611,15 +5611,9 @@ static __exit void md_exit(void)
5611{ 5611{
5612 mddev_t *mddev; 5612 mddev_t *mddev;
5613 struct list_head *tmp; 5613 struct list_head *tmp;
5614 int i; 5614
5615 blk_unregister_region(MKDEV(MAJOR_NR,0), MAX_MD_DEVS); 5615 blk_unregister_region(MKDEV(MAJOR_NR,0), MAX_MD_DEVS);
5616 blk_unregister_region(MKDEV(mdp_major,0), MAX_MD_DEVS << MdpMinorShift); 5616 blk_unregister_region(MKDEV(mdp_major,0), MAX_MD_DEVS << MdpMinorShift);
5617 for (i=0; i < MAX_MD_DEVS; i++)
5618 devfs_remove("md/%d", i);
5619 for (i=0; i < MAX_MD_DEVS; i++)
5620 devfs_remove("md/d%d", i);
5621
5622 devfs_remove("md");
5623 5617
5624 unregister_blkdev(MAJOR_NR,"md"); 5618 unregister_blkdev(MAJOR_NR,"md");
5625 unregister_blkdev(mdp_major, "mdp"); 5619 unregister_blkdev(mdp_major, "mdp");
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
index 8e926d98bd92..40774feb8953 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -248,9 +248,6 @@ void dvb_unregister_device(struct dvb_device *dvbdev)
248 if (!dvbdev) 248 if (!dvbdev)
249 return; 249 return;
250 250
251 devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num,
252 dnames[dvbdev->type], dvbdev->id);
253
254 class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, 251 class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num,
255 dvbdev->type, dvbdev->id))); 252 dvbdev->type, dvbdev->id)));
256 253
@@ -314,8 +311,6 @@ EXPORT_SYMBOL(dvb_register_adapter);
314 311
315int dvb_unregister_adapter(struct dvb_adapter *adap) 312int dvb_unregister_adapter(struct dvb_adapter *adap)
316{ 313{
317 devfs_remove("dvb/adapter%d", adap->num);
318
319 if (mutex_lock_interruptible(&dvbdev_register_lock)) 314 if (mutex_lock_interruptible(&dvbdev_register_lock))
320 return -ERESTARTSYS; 315 return -ERESTARTSYS;
321 list_del (&adap->list_head); 316 list_del (&adap->list_head);
@@ -421,7 +416,6 @@ error:
421 416
422static void __exit exit_dvbdev(void) 417static void __exit exit_dvbdev(void)
423{ 418{
424 devfs_remove("dvb");
425 class_destroy(dvb_class); 419 class_destroy(dvb_class);
426 cdev_del(&dvb_device_cdev); 420 cdev_del(&dvb_device_cdev);
427 unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS); 421 unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index cc67ee952838..3178353787da 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -1601,7 +1601,6 @@ void video_unregister_device(struct video_device *vfd)
1601 if(video_device[vfd->minor]!=vfd) 1601 if(video_device[vfd->minor]!=vfd)
1602 panic("videodev: bad unregister"); 1602 panic("videodev: bad unregister");
1603 1603
1604 devfs_remove(vfd->devfs_name);
1605 video_device[vfd->minor]=NULL; 1604 video_device[vfd->minor]=NULL;
1606 class_device_unregister(&vfd->class_dev); 1605 class_device_unregister(&vfd->class_dev);
1607 mutex_unlock(&videodev_lock); 1606 mutex_unlock(&videodev_lock);
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c
index 82c660bf1652..2e5218b8d4a3 100644
--- a/drivers/mmc/mmc_block.c
+++ b/drivers/mmc/mmc_block.c
@@ -564,7 +564,6 @@ static int __init mmc_blk_init(void)
564static void __exit mmc_blk_exit(void) 564static void __exit mmc_blk_exit(void)
565{ 565{
566 mmc_unregister_driver(&mmc_driver); 566 mmc_unregister_driver(&mmc_driver);
567 devfs_remove("mmc");
568 unregister_blkdev(major, "mmc"); 567 unregister_blkdev(major, "mmc");
569} 568}
570 569
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 52bc51545134..16a59cafb8d3 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -2674,7 +2674,6 @@ static void __exit ppp_cleanup(void)
2674 cardmap_destroy(&all_ppp_units); 2674 cardmap_destroy(&all_ppp_units);
2675 if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) 2675 if (unregister_chrdev(PPP_MAJOR, "ppp") != 0)
2676 printk(KERN_ERR "PPP: failed to unregister PPP device\n"); 2676 printk(KERN_ERR "PPP: failed to unregister PPP device\n");
2677 devfs_remove("ppp");
2678 class_device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0)); 2677 class_device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0));
2679 class_destroy(ppp_class); 2678 class_destroy(ppp_class);
2680} 2679}
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index c7b530628c8e..3d1e2b6700a7 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -418,12 +418,9 @@ static void __exit cosa_exit(void)
418 int i; 418 int i;
419 printk(KERN_INFO "Unloading the cosa module\n"); 419 printk(KERN_INFO "Unloading the cosa module\n");
420 420
421 for (i=0; i<nr_cards; i++) { 421 for (i=0; i<nr_cards; i++)
422 class_device_destroy(cosa_class, MKDEV(cosa_major, i)); 422 class_device_destroy(cosa_class, MKDEV(cosa_major, i));
423 devfs_remove("cosa/%d", i);
424 }
425 class_destroy(cosa_class); 423 class_destroy(cosa_class);
426 devfs_remove("cosa");
427 for (cosa=cosa_cards; nr_cards--; cosa++) { 424 for (cosa=cosa_cards; nr_cards--; cosa++) {
428 /* Clean up the per-channel data */ 425 /* Clean up the per-channel data */
429 for (i=0; i<cosa->nchannels; i++) { 426 for (i=0; i<cosa->nchannels; i++) {
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 09bf44fdb1d1..8b67ce006521 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1834,7 +1834,6 @@ dasd_exit(void)
1834 } 1834 }
1835 dasd_gendisk_exit(); 1835 dasd_gendisk_exit();
1836 dasd_devmap_exit(); 1836 dasd_devmap_exit();
1837 devfs_remove("dasd");
1838 if (dasd_debug_area != NULL) { 1837 if (dasd_debug_area != NULL) {
1839 debug_unregister(dasd_debug_area); 1838 debug_unregister(dasd_debug_area);
1840 dasd_debug_area = NULL; 1839 dasd_debug_area = NULL;
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c
index 36bc01f83a51..15aad01bba07 100644
--- a/drivers/s390/block/xpram.c
+++ b/drivers/s390/block/xpram.c
@@ -474,7 +474,6 @@ static int __init xpram_setup_blkdev(void)
474 474
475 return 0; 475 return 0;
476out_unreg: 476out_unreg:
477 devfs_remove("slram");
478 unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); 477 unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME);
479out: 478out:
480 while (i--) 479 while (i--)
@@ -493,7 +492,6 @@ static void __exit xpram_exit(void)
493 put_disk(xpram_disks[i]); 492 put_disk(xpram_disks[i]);
494 } 493 }
495 unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); 494 unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME);
496 devfs_remove("slram");
497 blk_cleanup_queue(xpram_queue); 495 blk_cleanup_queue(xpram_queue);
498 sysdev_unregister(&xpram_sys_device); 496 sysdev_unregister(&xpram_sys_device);
499 sysdev_class_unregister(&xpram_sysclass); 497 sysdev_class_unregister(&xpram_sysclass);
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c
index e680de41d762..03ff5a3b121b 100644
--- a/drivers/sbus/char/bpp.c
+++ b/drivers/sbus/char/bpp.c
@@ -1039,9 +1039,6 @@ static void __exit bpp_cleanup(void)
1039{ 1039{
1040 unsigned idx; 1040 unsigned idx;
1041 1041
1042 for (idx = 0; idx < BPP_NO; idx++)
1043 devfs_remove("bpp/%d", idx);
1044 devfs_remove("bpp");
1045 unregister_chrdev(BPP_MAJOR, dev_name); 1042 unregister_chrdev(BPP_MAJOR, dev_name);
1046 1043
1047 for (idx = 0; idx < BPP_NO; idx++) { 1044 for (idx = 0; idx < BPP_NO; idx++) {
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c
index 5d32384ad728..55b2b31bd7ab 100644
--- a/drivers/sbus/char/vfc_dev.c
+++ b/drivers/sbus/char/vfc_dev.c
@@ -712,7 +712,6 @@ static void deinit_vfc_device(struct vfc_dev *dev)
712{ 712{
713 if(dev == NULL) 713 if(dev == NULL)
714 return; 714 return;
715 devfs_remove("vfc/%d", dev->instance);
716 sbus_iounmap(dev->regs, sizeof(struct vfc_regs)); 715 sbus_iounmap(dev->regs, sizeof(struct vfc_regs));
717 kfree(dev); 716 kfree(dev);
718} 717}
@@ -726,7 +725,6 @@ void cleanup_module(void)
726 for (devp = vfc_dev_lst; *devp; devp++) 725 for (devp = vfc_dev_lst; *devp; devp++)
727 deinit_vfc_device(*devp); 726 deinit_vfc_device(*devp);
728 727
729 devfs_remove("vfc");
730 kfree(vfc_dev_lst); 728 kfree(vfc_dev_lst);
731 return; 729 return;
732} 730}
diff --git a/drivers/telephony/phonedev.c b/drivers/telephony/phonedev.c
index 80f9fe405279..bc5b1d245df9 100644
--- a/drivers/telephony/phonedev.c
+++ b/drivers/telephony/phonedev.c
@@ -123,7 +123,6 @@ void phone_unregister_device(struct phone_device *pfd)
123 mutex_lock(&phone_lock); 123 mutex_lock(&phone_lock);
124 if (phone_device[pfd->minor] != pfd) 124 if (phone_device[pfd->minor] != pfd)
125 panic("phone: bad unregister"); 125 panic("phone: bad unregister");
126 devfs_remove("phone/%d", pfd->minor);
127 phone_device[pfd->minor] = NULL; 126 phone_device[pfd->minor] = NULL;
128 mutex_unlock(&phone_lock); 127 mutex_unlock(&phone_lock);
129} 128}
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index be2479ab8bc1..afa56a887fa6 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1357,7 +1357,6 @@ unregister_framebuffer(struct fb_info *fb_info)
1357 i = fb_info->node; 1357 i = fb_info->node;
1358 if (!registered_fb[i]) 1358 if (!registered_fb[i])
1359 return -EINVAL; 1359 return -EINVAL;
1360 devfs_remove("fb/%d", i);
1361 1360
1362 if (fb_info->pixmap.addr && 1361 if (fb_info->pixmap.addr &&
1363 (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT)) 1362 (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT))
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c
index f478222cb5c9..aaf6462a9421 100644
--- a/fs/coda/psdev.c
+++ b/fs/coda/psdev.c
@@ -409,12 +409,9 @@ static int __init init_coda(void)
409 } 409 }
410 return 0; 410 return 0;
411out: 411out:
412 for (i = 0; i < MAX_CODADEVS; i++) { 412 for (i = 0; i < MAX_CODADEVS; i++)
413 class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); 413 class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i));
414 devfs_remove("coda/%d", i);
415 }
416 class_destroy(coda_psdev_class); 414 class_destroy(coda_psdev_class);
417 devfs_remove("coda");
418 unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); 415 unregister_chrdev(CODA_PSDEV_MAJOR, "coda");
419 coda_sysctl_clean(); 416 coda_sysctl_clean();
420out1: 417out1:
@@ -431,12 +428,9 @@ static void __exit exit_coda(void)
431 if ( err != 0 ) { 428 if ( err != 0 ) {
432 printk("coda: failed to unregister filesystem\n"); 429 printk("coda: failed to unregister filesystem\n");
433 } 430 }
434 for (i = 0; i < MAX_CODADEVS; i++) { 431 for (i = 0; i < MAX_CODADEVS; i++)
435 class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); 432 class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i));
436 devfs_remove("coda/%d", i);
437 }
438 class_destroy(coda_psdev_class); 433 class_destroy(coda_psdev_class);
439 devfs_remove("coda");
440 unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); 434 unregister_chrdev(CODA_PSDEV_MAJOR, "coda");
441 coda_sysctl_clean(); 435 coda_sysctl_clean();
442 coda_destroy_inodecache(); 436 coda_destroy_inodecache();
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index d7a5078b3d75..202f50acea88 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -320,7 +320,6 @@ void delete_partition(struct gendisk *disk, int part)
320 p->nr_sects = 0; 320 p->nr_sects = 0;
321 p->ios[0] = p->ios[1] = 0; 321 p->ios[0] = p->ios[1] = 0;
322 p->sectors[0] = p->sectors[1] = 0; 322 p->sectors[0] = p->sectors[1] = 0;
323 devfs_remove("%s/part%d", disk->devfs_name, part);
324 sysfs_remove_link(&p->kobj, "subsystem"); 323 sysfs_remove_link(&p->kobj, "subsystem");
325 if (p->holder_dir) 324 if (p->holder_dir)
326 kobject_unregister(p->holder_dir); 325 kobject_unregister(p->holder_dir);
diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h
index c7d05dbc2af7..2036d2e90987 100644
--- a/include/linux/devfs_fs_kernel.h
+++ b/include/linux/devfs_fs_kernel.h
@@ -6,7 +6,4 @@
6#include <linux/types.h> 6#include <linux/types.h>
7#include <asm/semaphore.h> 7#include <asm/semaphore.h>
8 8
9static inline void devfs_remove(const char *fmt, ...)
10{
11}
12#endif /* _LINUX_DEVFS_FS_KERNEL_H */ 9#endif /* _LINUX_DEVFS_FS_KERNEL_H */