From 95dc112a5770dc670a1b45a3d9ee346fdd2b2697 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree Removes the devfs_mk_dir() function and all callers of it. Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-ioctl.c | 1 - drivers/md/md.c | 1 - 2 files changed, 2 deletions(-) (limited to 'drivers/md') diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 3edb3477f987..181971a978ba 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -68,7 +68,6 @@ static int dm_hash_init(void) { init_buckets(_name_buckets); init_buckets(_uuid_buckets); - devfs_mk_dir(DM_DIR); return 0; } diff --git a/drivers/md/md.c b/drivers/md/md.c index 306268ec99ff..33b1a8943e4a 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5553,7 +5553,6 @@ static int __init md_init(void) unregister_blkdev(MAJOR_NR, "md"); return -1; } - devfs_mk_dir("md"); blk_register_region(MKDEV(MAJOR_NR, 0), MAX_MD_DEVS, THIS_MODULE, md_probe, NULL, NULL); blk_register_region(MKDEV(mdp_major, 0), MAX_MD_DEVS< Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree Removes the devfs_mk_bdev() function and all callers of it. Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-ioctl.c | 14 -------------- drivers/md/md.c | 13 ------------- 2 files changed, 27 deletions(-) (limited to 'drivers/md') diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 181971a978ba..6e1b51d748ac 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -173,16 +173,6 @@ static void free_cell(struct hash_cell *hc) /* * devfs stuff. */ -static int register_with_devfs(struct hash_cell *hc) -{ - struct gendisk *disk = dm_disk(hc->md); - - devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), - S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP, - DM_DIR "/%s", hc->name); - return 0; -} - static int unregister_with_devfs(struct hash_cell *hc) { devfs_remove(DM_DIR"/%s", hc->name); @@ -225,7 +215,6 @@ static int dm_hash_insert(const char *name, const char *uuid, struct mapped_devi } list_add(&cell->uuid_list, _uuid_buckets + hash_str(uuid)); } - register_with_devfs(cell); dm_get(md); dm_set_mdptr(md, cell); up_write(&_hash_lock); @@ -348,9 +337,6 @@ static int dm_hash_rename(const char *old, const char *new) hc->name = new_name; list_add(&hc->name_list, _name_buckets + hash_str(new_name)); - /* rename the device node in devfs */ - register_with_devfs(hc); - /* * Wake up any dm event waiters. */ diff --git a/drivers/md/md.c b/drivers/md/md.c index 33b1a8943e4a..ee7320b4a30e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5538,8 +5538,6 @@ static void md_geninit(void) static int __init md_init(void) { - int minor; - printk(KERN_INFO "md: md driver %d.%d.%d MAX_MD_DEVS=%d," " MD_SB_DISKS=%d\n", MD_MAJOR_VERSION, MD_MINOR_VERSION, @@ -5558,17 +5556,6 @@ static int __init md_init(void) blk_register_region(MKDEV(mdp_major, 0), MAX_MD_DEVS< Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [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 --- drivers/md/dm-ioctl.c | 13 ------------- drivers/md/md.c | 8 +------- 2 files changed, 1 insertion(+), 20 deletions(-) (limited to 'drivers/md') 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) static void dm_hash_exit(void) { dm_hash_remove_all(0); - devfs_remove(DM_DIR); } /*----------------------------------------------------------------- @@ -170,15 +169,6 @@ static void free_cell(struct hash_cell *hc) } } -/* - * devfs stuff. - */ -static int unregister_with_devfs(struct hash_cell *hc) -{ - devfs_remove(DM_DIR"/%s", hc->name); - return 0; -} - /* * The kdev_t and uuid of a device can never change once it is * initially inserted. @@ -234,7 +224,6 @@ static void __hash_remove(struct hash_cell *hc) /* remove from the dev hash */ list_del(&hc->uuid_list); list_del(&hc->name_list); - unregister_with_devfs(hc); dm_set_mdptr(hc->md, NULL); table = dm_get_table(hc->md); @@ -330,8 +319,6 @@ static int dm_hash_rename(const char *old, const char *new) /* * rename and move the name cell. */ - unregister_with_devfs(hc); - list_del(&hc->name_list); old_name = hc->name; 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) { mddev_t *mddev; struct list_head *tmp; - int i; + blk_unregister_region(MKDEV(MAJOR_NR,0), MAX_MD_DEVS); blk_unregister_region(MKDEV(mdp_major,0), MAX_MD_DEVS << MdpMinorShift); - for (i=0; i < MAX_MD_DEVS; i++) - devfs_remove("md/%d", i); - for (i=0; i < MAX_MD_DEVS; i++) - devfs_remove("md/d%d", i); - - devfs_remove("md"); unregister_blkdev(MAJOR_NR,"md"); unregister_blkdev(mdp_major, "mdp"); -- cgit v1.2.3 From ff23eca3e8f613034e0d20ff86f6a89b62f5a14e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree Also fixes up all files that #include it. Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-ioctl.c | 1 - drivers/md/md.c | 1 - 2 files changed, 2 deletions(-) (limited to 'drivers/md') diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 361d50b6469f..3ad60caea773 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include diff --git a/drivers/md/md.c b/drivers/md/md.c index 9fc2314b58d9..95c275d19316 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -39,7 +39,6 @@ #include #include #include -#include #include /* for invalidate_bdev */ #include #include -- cgit v1.2.3 From 96192ff1a9d0c6ef365d21667080259d83ea2f5b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed Also fixes all drivers that set this field. Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-ioctl.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/md') diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 3ad60caea773..d13bb15a8a02 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1472,7 +1472,6 @@ static struct file_operations _ctl_fops = { static struct miscdevice _dm_misc = { .minor = MISC_DYNAMIC_MINOR, .name = DM_NAME, - .devfs_name = "mapper/control", .fops = &_ctl_fops }; -- cgit v1.2.3 From ce7b0f46bbf4bff8daab2dd3d878b9e72a623d09 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed And remove the now unneeded number field. Also fixes all drivers that set these fields. Signed-off-by: Greg Kroah-Hartman --- drivers/md/md.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'drivers/md') diff --git a/drivers/md/md.c b/drivers/md/md.c index 95c275d19316..2ec1b3520a0b 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2910,13 +2910,10 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data) } disk->major = MAJOR(dev); disk->first_minor = unit << shift; - if (partitioned) { + if (partitioned) sprintf(disk->disk_name, "md_d%d", unit); - sprintf(disk->devfs_name, "md/d%d", unit); - } else { + else sprintf(disk->disk_name, "md%d", unit); - sprintf(disk->devfs_name, "md/%d", unit); - } disk->fops = &md_fops; disk->private_data = mddev; disk->queue = mddev->queue; -- cgit v1.2.3 From 890fbae2818a045350b8d1e3bda61ceb88ff1d17 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Last little devfs cleanups throughout the kernel tree. Just removes a few unused #defines and fixes some comments due to devfs now being gone. Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/md') diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 3ed2e53b9eb6..c99bf9f01759 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -167,7 +167,7 @@ static void local_exit(void) bioset_free(dm_set); if (unregister_blkdev(_major, _name) < 0) - DMERR("devfs_unregister_blkdev failed"); + DMERR("unregister_blkdev failed"); _major = 0; -- cgit v1.2.3