Commit a648f51e authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] devfs: kill devfs_register_partition

parent 3ce85683
......@@ -254,14 +254,3 @@ void devfs_dealloc_devnum(umode_t mode, dev_t devnum)
}
up(&device_list_mutex);
}
void devfs_register_partition(struct gendisk *dev, int part)
{
char devname[64];
sprintf(devname, "%s/part%d", dev->devfs_name, part);
devfs_register(NULL, devname, 0,
dev->major, dev->first_minor + part,
S_IFBLK | S_IRUSR | S_IWUSR,
dev->fops, NULL);
}
......@@ -251,7 +251,11 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len)
p->start_sect = start;
p->nr_sects = len;
devfs_register_partition(disk, part);
devfs_mk_bdev(MKDEV(disk->major, disk->first_minor + part),
S_IFBLK|S_IRUSR|S_IWUSR,
"%s/part%d", disk->devfs_name, part);
snprintf(p->kobj.name,KOBJ_NAME_LEN,"%s%d",disk->kobj.name,part);
p->kobj.parent = &disk->kobj;
p->kobj.ktype = &ktype_part;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment