aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/floppy.c
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/block/floppy.c
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/floppy.c')
-rw-r--r--drivers/block/floppy.c33
1 files changed, 1 insertions, 32 deletions
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);