[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>
This commit is contained in:
Greg Kroah-Hartman
2005-06-20 21:15:16 -07:00
parent 7c69ef7974
commit 8ab5e4c15b
47 changed files with 9 additions and 161 deletions

View File

@@ -1027,10 +1027,6 @@ int init_module(void)
void cleanup_module(void)
{
int i;
for (i = 0; i < MAX_SLM; i++)
devfs_remove("slm/%d", i);
devfs_remove("slm");
if (unregister_chrdev( ACSI_MAJOR, "slm" ) != 0)
printk( KERN_ERR "acsi_slm: cleanup_module failed\n");
atari_stram_free( SLMBuffer );

View File

@@ -348,7 +348,6 @@ static void __devexit cpqarray_remove_one(int i)
for(j = 0; j < NWD; j++) {
if (ida_gendisk[i][j]->flags & GENHD_FL_UP)
del_gendisk(ida_gendisk[i][j]);
devfs_remove("ida/c%dd%d",i,j);
put_disk(ida_gendisk[i][j]);
}
blk_cleanup_queue(hba[i]->queue);
@@ -1844,7 +1843,6 @@ static void __exit cpqarray_exit(void)
}
}
devfs_remove("ida");
remove_proc_entry("cpqarray", proc_root_driver);
}

View File

@@ -3952,20 +3952,6 @@ static struct block_device_operations floppy_fops = {
.media_changed = check_floppy_change,
.revalidate_disk = floppy_revalidate,
};
static char *table[] = {
"", "d360", "h1200", "u360", "u720", "h360", "h720",
"u1440", "u2880", "CompaQ", "h1440", "u1680", "h410",
"u820", "h1476", "u1722", "h420", "u830", "h1494", "u1743",
"h880", "u1040", "u1120", "h1600", "u1760", "u1920",
"u3200", "u3520", "u3840", "u1840", "u800", "u1600",
NULL
};
static int t360[] = { 1, 0 },
t1200[] = { 2, 5, 6, 10, 12, 14, 16, 18, 20, 23, 0 },
t3in[] = { 8, 9, 26, 27, 28, 7, 11, 15, 19, 24, 25, 29, 31, 3, 4, 13,
17, 21, 22, 30, 0 };
static int *table_sup[] =
{ NULL, t360, t1200, t3in + 5 + 8, t3in + 5, t3in, t3in };
/*
* Floppy Driver initialization
@@ -4244,7 +4230,7 @@ static int __init floppy_init(void)
err = register_blkdev(FLOPPY_MAJOR, "fd");
if (err)
goto out_devfs_remove;
goto out_put_disk;
floppy_queue = blk_init_queue(do_fd_request, &floppy_lock);
if (!floppy_queue) {
@@ -4403,8 +4389,6 @@ out_unreg_region:
blk_cleanup_queue(floppy_queue);
out_unreg_blkdev:
unregister_blkdev(FLOPPY_MAJOR, "fd");
out_devfs_remove:
devfs_remove("floppy");
out_put_disk:
while (dr--) {
del_timer(&motor_off_timer[dr]);
@@ -4565,19 +4549,6 @@ static void floppy_release_irq_and_dma(void)
static char *floppy;
static void unregister_devfs_entries(int drive)
{
int i;
if (UDP->cmos < ARRAY_SIZE(default_drive_params)) {
i = 0;
do {
devfs_remove("floppy/%d%s", drive,
table[table_sup[UDP->cmos][i]]);
} while (table_sup[UDP->cmos][i++]);
}
}
static void __init parse_floppy_cfg_string(char *cfg)
{
char *ptr;
@@ -4614,13 +4585,11 @@ void cleanup_module(void)
if ((allowed_drive_mask & (1 << drive)) &&
fdc_state[FDC(drive)].version != FDC_NONE) {
del_gendisk(disks[drive]);
unregister_devfs_entries(drive);
device_remove_file(&floppy_device[drive].dev, &dev_attr_cmos);
platform_device_unregister(&floppy_device[drive]);
}
put_disk(disks[drive]);
}
devfs_remove("floppy");
del_timer_sync(&fd_timeout);
del_timer_sync(&fd_timer);

View File

@@ -1308,7 +1308,6 @@ static int __init loop_init(void)
out_mem4:
while (i--)
blk_cleanup_queue(loop_dev[i].lo_queue);
devfs_remove("loop");
i = max_loop;
out_mem3:
while (i--)
@@ -1331,7 +1330,6 @@ static void loop_exit(void)
blk_cleanup_queue(loop_dev[i].lo_queue);
put_disk(disks[i]);
}
devfs_remove("loop");
if (unregister_blkdev(LOOP_MAJOR, "loop"))
printk(KERN_WARNING "loop: cannot unregister blkdev\n");

View File

@@ -685,7 +685,6 @@ static void __exit nbd_cleanup(void)
put_disk(disk);
}
}
devfs_remove("nbd");
unregister_blkdev(NBD_MAJOR, "nbd");
printk(KERN_INFO "nbd: unregistered device at major %d\n", NBD_MAJOR);
}

View File

@@ -695,13 +695,10 @@ static void __exit pg_exit(void)
for (unit = 0; unit < PG_UNITS; unit++) {
struct pg *dev = &devices[unit];
if (dev->present) {
if (dev->present)
class_device_destroy(pg_class, MKDEV(major, unit));
devfs_remove("pg/%u", unit);
}
}
class_destroy(pg_class);
devfs_remove("pg");
unregister_chrdev(major, name);
for (unit = 0; unit < PG_UNITS; unit++) {

View File

@@ -992,12 +992,9 @@ static void __exit pt_exit(void)
for (unit = 0; unit < PT_UNITS; unit++)
if (pt[unit].present) {
class_device_destroy(pt_class, MKDEV(major, unit));
devfs_remove("pt/%d", unit);
class_device_destroy(pt_class, MKDEV(major, unit + 128));
devfs_remove("pt/%dn", unit);
}
class_destroy(pt_class);
devfs_remove("pt");
unregister_chrdev(major, name);
for (unit = 0; unit < PT_UNITS; unit++)
if (pt[unit].present)

View File

@@ -412,7 +412,6 @@ static void __exit rd_cleanup(void)
put_disk(rd_disks[i]);
blk_cleanup_queue(rd_queue[i]);
}
devfs_remove("rd");
unregister_blkdev(RAMDISK_MAJOR, "ramdisk");
}

View File

@@ -1736,7 +1736,6 @@ static void carm_remove_one (struct pci_dev *pdev)
free_irq(pdev->irq, host);
carm_free_disks(host);
devfs_remove(DRV_NAME);
unregister_blkdev(host->major, host->name);
if (host->major == 160)
clear_bit(0, &carm_major_alloc);

View File

@@ -2453,7 +2453,6 @@ static int __init ub_init(void)
return 0;
err_register:
devfs_remove(DEVFS_NAME);
unregister_blkdev(UB_MAJOR, DRV_NAME);
err_regblkdev:
return rc;
@@ -2463,7 +2462,6 @@ static void __exit ub_exit(void)
{
usb_deregister(&ub_driver);
devfs_remove(DEVFS_NAME);
unregister_blkdev(UB_MAJOR, DRV_NAME);
usb_usual_clear_present(USB_US_TYPE_UB);
}