diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-21 00:15:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-26 15:25:06 -0400 |
commit | 1a715c5cf917326a285533d1116d725f5f2593c2 (patch) | |
tree | 23833b5463940023bd4074a3a465c245adaff9fa /drivers/md | |
parent | 79021a625c36162d24c852bbbdb04f0c1cb32db3 (diff) |
[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 <gregkh@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-ioctl.c | 14 | ||||
-rw-r--r-- | drivers/md/md.c | 13 |
2 files changed, 0 insertions, 27 deletions
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) | |||
173 | /* | 173 | /* |
174 | * devfs stuff. | 174 | * devfs stuff. |
175 | */ | 175 | */ |
176 | static int register_with_devfs(struct hash_cell *hc) | ||
177 | { | ||
178 | struct gendisk *disk = dm_disk(hc->md); | ||
179 | |||
180 | devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), | ||
181 | S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP, | ||
182 | DM_DIR "/%s", hc->name); | ||
183 | return 0; | ||
184 | } | ||
185 | |||
186 | static int unregister_with_devfs(struct hash_cell *hc) | 176 | static int unregister_with_devfs(struct hash_cell *hc) |
187 | { | 177 | { |
188 | devfs_remove(DM_DIR"/%s", hc->name); | 178 | 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 | |||
225 | } | 215 | } |
226 | list_add(&cell->uuid_list, _uuid_buckets + hash_str(uuid)); | 216 | list_add(&cell->uuid_list, _uuid_buckets + hash_str(uuid)); |
227 | } | 217 | } |
228 | register_with_devfs(cell); | ||
229 | dm_get(md); | 218 | dm_get(md); |
230 | dm_set_mdptr(md, cell); | 219 | dm_set_mdptr(md, cell); |
231 | up_write(&_hash_lock); | 220 | up_write(&_hash_lock); |
@@ -348,9 +337,6 @@ static int dm_hash_rename(const char *old, const char *new) | |||
348 | hc->name = new_name; | 337 | hc->name = new_name; |
349 | list_add(&hc->name_list, _name_buckets + hash_str(new_name)); | 338 | list_add(&hc->name_list, _name_buckets + hash_str(new_name)); |
350 | 339 | ||
351 | /* rename the device node in devfs */ | ||
352 | register_with_devfs(hc); | ||
353 | |||
354 | /* | 340 | /* |
355 | * Wake up any dm event waiters. | 341 | * Wake up any dm event waiters. |
356 | */ | 342 | */ |
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) | |||
5538 | 5538 | ||
5539 | static int __init md_init(void) | 5539 | static int __init md_init(void) |
5540 | { | 5540 | { |
5541 | int minor; | ||
5542 | |||
5543 | printk(KERN_INFO "md: md driver %d.%d.%d MAX_MD_DEVS=%d," | 5541 | printk(KERN_INFO "md: md driver %d.%d.%d MAX_MD_DEVS=%d," |
5544 | " MD_SB_DISKS=%d\n", | 5542 | " MD_SB_DISKS=%d\n", |
5545 | MD_MAJOR_VERSION, MD_MINOR_VERSION, | 5543 | MD_MAJOR_VERSION, MD_MINOR_VERSION, |
@@ -5558,17 +5556,6 @@ static int __init md_init(void) | |||
5558 | blk_register_region(MKDEV(mdp_major, 0), MAX_MD_DEVS<<MdpMinorShift, THIS_MODULE, | 5556 | blk_register_region(MKDEV(mdp_major, 0), MAX_MD_DEVS<<MdpMinorShift, THIS_MODULE, |
5559 | md_probe, NULL, NULL); | 5557 | md_probe, NULL, NULL); |
5560 | 5558 | ||
5561 | for (minor=0; minor < MAX_MD_DEVS; ++minor) | ||
5562 | devfs_mk_bdev(MKDEV(MAJOR_NR, minor), | ||
5563 | S_IFBLK|S_IRUSR|S_IWUSR, | ||
5564 | "md/%d", minor); | ||
5565 | |||
5566 | for (minor=0; minor < MAX_MD_DEVS; ++minor) | ||
5567 | devfs_mk_bdev(MKDEV(mdp_major, minor<<MdpMinorShift), | ||
5568 | S_IFBLK|S_IRUSR|S_IWUSR, | ||
5569 | "md/mdp%d", minor); | ||
5570 | |||
5571 | |||
5572 | register_reboot_notifier(&md_notifier); | 5559 | register_reboot_notifier(&md_notifier); |
5573 | raid_table_header = register_sysctl_table(raid_root_table, 1); | 5560 | raid_table_header = register_sysctl_table(raid_root_table, 1); |
5574 | 5561 | ||