Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6: (22 commits) [PATCH] devfs: Remove it from the feature_removal.txt file [PATCH] devfs: Last little devfs cleanups throughout the kernel tree. [PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV [PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed [PATCH] devfs: Remove the line_driver devfs_name field as it's no longer needed [PATCH] devfs: Remove the videodevice devfs_name field as it's no longer needed [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed [PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree [PATCH] devfs: Remove devfs_remove() function from the kernel tree [PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree [PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree [PATCH] devfs: Remove devfs_mk_symlink() function from the kernel tree [PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree [PATCH] devfs: Remove devfs_*_tape() functions from the kernel tree [PATCH] devfs: Remove devfs support from the sound subsystem [PATCH] devfs: Remove devfs support from the ide subsystem. [PATCH] devfs: Remove devfs support from the serial subsystem [PATCH] devfs: Remove devfs from the init code [PATCH] devfs: Remove devfs from the partition code ...
This commit is contained in:
@ -25,7 +25,6 @@
|
||||
#include "linux/blkdev.h"
|
||||
#include "linux/hdreg.h"
|
||||
#include "linux/init.h"
|
||||
#include "linux/devfs_fs_kernel.h"
|
||||
#include "linux/cdrom.h"
|
||||
#include "linux/proc_fs.h"
|
||||
#include "linux/ctype.h"
|
||||
@ -628,7 +627,6 @@ static int ubd_new_disk(int major, u64 size, int unit,
|
||||
|
||||
{
|
||||
struct gendisk *disk;
|
||||
char from[sizeof("ubd/nnnnn\0")], to[sizeof("discnnnnn/disc\0")];
|
||||
int err;
|
||||
|
||||
disk = alloc_disk(1 << UBD_SHIFT);
|
||||
@ -639,20 +637,10 @@ static int ubd_new_disk(int major, u64 size, int unit,
|
||||
disk->first_minor = unit << UBD_SHIFT;
|
||||
disk->fops = &ubd_blops;
|
||||
set_capacity(disk, size / 512);
|
||||
if(major == MAJOR_NR){
|
||||
if(major == MAJOR_NR)
|
||||
sprintf(disk->disk_name, "ubd%c", 'a' + unit);
|
||||
sprintf(disk->devfs_name, "ubd/disc%d", unit);
|
||||
sprintf(from, "ubd/%d", unit);
|
||||
sprintf(to, "disc%d/disc", unit);
|
||||
err = devfs_mk_symlink(from, to);
|
||||
if(err)
|
||||
printk("ubd_new_disk failed to make link from %s to "
|
||||
"%s, error = %d\n", from, to, err);
|
||||
}
|
||||
else {
|
||||
else
|
||||
sprintf(disk->disk_name, "ubd_fake%d", unit);
|
||||
sprintf(disk->devfs_name, "ubd_fake/disc%d", unit);
|
||||
}
|
||||
|
||||
/* sysfs register (not for ide fake devices) */
|
||||
if (major == MAJOR_NR) {
|
||||
@ -841,7 +829,6 @@ int ubd_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
devfs_mk_dir("ubd");
|
||||
if (register_blkdev(MAJOR_NR, "ubd"))
|
||||
return -1;
|
||||
|
||||
@ -855,7 +842,6 @@ int ubd_init(void)
|
||||
char name[sizeof("ubd_nnn\0")];
|
||||
|
||||
snprintf(name, sizeof(name), "ubd_%d", fake_major);
|
||||
devfs_mk_dir(name);
|
||||
if (register_blkdev(fake_major, "ubd"))
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user