summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 21:15:16 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-26 12:25:07 -0700
commit8ab5e4c15b53e147c08031a959d9f776823dbe73 (patch)
treeb851d4c1fdbd396379279e4475f7f778a667a208 /drivers/block
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/block')
-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
10 files changed, 2 insertions, 52 deletions
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)
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 );
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)
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);
}
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 = {
.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);
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)
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");
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)
put_disk(disk);
}
}
- devfs_remove("nbd");
unregister_blkdev(NBD_MAJOR, "nbd");
printk(KERN_INFO "nbd: unregistered device at major %d\n", NBD_MAJOR);
}
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)
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++) {
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)
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)
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)
put_disk(rd_disks[i]);
blk_cleanup_queue(rd_queue[i]);
}
- devfs_remove("rd");
unregister_blkdev(RAMDISK_MAJOR, "ramdisk");
}
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)
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);
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)
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);
}