]> err.no Git - linux-2.6/commitdiff
[PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Jun 2005 04:15:16 +0000 (21:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Jun 2006 19:25:06 +0000 (12:25 -0700)
Removes the devfs_mk_bdev() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/block/floppy.c
drivers/md/dm-ioctl.c
drivers/md/md.c
fs/partitions/check.c
include/linux/devfs_fs_kernel.h

index 03a4dff05f27613f38479441858b40b8f6f0a204..ec14e6e6bccb2e70f9f46b380abb7b9de73cee2a 100644 (file)
@@ -224,7 +224,6 @@ static struct completion device_release;
 static unsigned short virtual_dma_port = 0x3f0;
 irqreturn_t floppy_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 static int set_dor(int fdc, char mask, char data);
-static void register_devfs_entries(int drive) __init;
 
 #define K_64   0x10000         /* 64KB */
 
@@ -3676,7 +3675,6 @@ static void __init config_types(void)
                                first = 0;
                        }
                        printk("%s fd%d is %s", prepend, drive, name);
-                       register_devfs_entries(drive);
                }
                *UDP = *params;
        }
@@ -3969,23 +3967,6 @@ static int t360[] = { 1, 0 },
 static int *table_sup[] =
     { NULL, t360, t1200, t3in + 5 + 8, t3in + 5, t3in, t3in };
 
-static void __init register_devfs_entries(int drive)
-{
-       int base_minor = (drive < 4) ? drive : (124 + drive);
-
-       if (UDP->cmos < ARRAY_SIZE(default_drive_params)) {
-               int i = 0;
-               do {
-                       int minor = base_minor + (table_sup[UDP->cmos][i] << 2);
-
-                       devfs_mk_bdev(MKDEV(FLOPPY_MAJOR, minor),
-                                     S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP |
-                                     S_IWGRP, "floppy/%d%s", drive,
-                                     table[table_sup[UDP->cmos][i]]);
-               } while (table_sup[UDP->cmos][i++]);
-       }
-}
-
 /*
  * Floppy Driver initialization
  * =============================
index 181971a978ba7f09f92a2b5c15ae5a8648e205f3..6e1b51d748ac8afd35a3df828f7661a51d76800c 100644 (file)
@@ -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.
         */
index 33b1a8943e4a051b35ed4a27e375d698d8c4533a..ee7320b4a30e0dc151b0787d595304f2de31852e 100644 (file)
@@ -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<<MdpMinorShift, THIS_MODULE,
                            md_probe, NULL, NULL);
 
-       for (minor=0; minor < MAX_MD_DEVS; ++minor)
-               devfs_mk_bdev(MKDEV(MAJOR_NR, minor),
-                               S_IFBLK|S_IRUSR|S_IWUSR,
-                               "md/%d", minor);
-
-       for (minor=0; minor < MAX_MD_DEVS; ++minor)
-               devfs_mk_bdev(MKDEV(mdp_major, minor<<MdpMinorShift),
-                             S_IFBLK|S_IRUSR|S_IWUSR,
-                             "md/mdp%d", minor);
-
-
        register_reboot_notifier(&md_notifier);
        raid_table_header = register_sysctl_table(raid_root_table, 1);
 
index 2ab7701eb2fb52937b7a9a1cd4bccb0747a9b125..d7a5078b3d75bbb4abb3c2b923fc21fe2fc21247 100644 (file)
@@ -342,10 +342,6 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len)
        p->nr_sects = len;
        p->partno = part;
 
-       devfs_mk_bdev(MKDEV(disk->major, disk->first_minor + part),
-                       S_IFBLK|S_IRUSR|S_IWUSR,
-                       "%s/part%d", disk->devfs_name, part);
-
        if (isdigit(disk->kobj.name[strlen(disk->kobj.name)-1]))
                snprintf(p->kobj.name,KOBJ_NAME_LEN,"%sp%d",disk->kobj.name,part);
        else
index da336a3c6c7bce446b1ea0f6a366d95f289d63a0..6d9f003dbce5837edbc86a0ef2f558ded609e5a1 100644 (file)
@@ -6,10 +6,6 @@
 #include <linux/types.h>
 #include <asm/semaphore.h>
 
-static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
-{
-       return 0;
-}
 static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
 {
        return 0;