aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/ubd_kern.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 17:19:21 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 17:19:21 -0400
commit602cada851b28c5792339786efe872fbdc1f5d41 (patch)
tree233d474b74d6038b5bb54a07ad91dd1bb10b0218 /arch/um/drivers/ubd_kern.c
parent82991c6f2c361acc17279b8124d9bf1878973435 (diff)
parentfee68d1cc0d9bd863e51c16cdcd707737b16bb38 (diff)
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 ...
Diffstat (limited to 'arch/um/drivers/ubd_kern.c')
-rw-r--r--arch/um/drivers/ubd_kern.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 290cec6d69e2..0345e2551247 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -25,7 +25,6 @@
25#include "linux/blkdev.h" 25#include "linux/blkdev.h"
26#include "linux/hdreg.h" 26#include "linux/hdreg.h"
27#include "linux/init.h" 27#include "linux/init.h"
28#include "linux/devfs_fs_kernel.h"
29#include "linux/cdrom.h" 28#include "linux/cdrom.h"
30#include "linux/proc_fs.h" 29#include "linux/proc_fs.h"
31#include "linux/ctype.h" 30#include "linux/ctype.h"
@@ -628,7 +627,6 @@ static int ubd_new_disk(int major, u64 size, int unit,
628 627
629{ 628{
630 struct gendisk *disk; 629 struct gendisk *disk;
631 char from[sizeof("ubd/nnnnn\0")], to[sizeof("discnnnnn/disc\0")];
632 int err; 630 int err;
633 631
634 disk = alloc_disk(1 << UBD_SHIFT); 632 disk = alloc_disk(1 << UBD_SHIFT);
@@ -639,20 +637,10 @@ static int ubd_new_disk(int major, u64 size, int unit,
639 disk->first_minor = unit << UBD_SHIFT; 637 disk->first_minor = unit << UBD_SHIFT;
640 disk->fops = &ubd_blops; 638 disk->fops = &ubd_blops;
641 set_capacity(disk, size / 512); 639 set_capacity(disk, size / 512);
642 if(major == MAJOR_NR){ 640 if(major == MAJOR_NR)
643 sprintf(disk->disk_name, "ubd%c", 'a' + unit); 641 sprintf(disk->disk_name, "ubd%c", 'a' + unit);
644 sprintf(disk->devfs_name, "ubd/disc%d", unit); 642 else
645 sprintf(from, "ubd/%d", unit);
646 sprintf(to, "disc%d/disc", unit);
647 err = devfs_mk_symlink(from, to);
648 if(err)
649 printk("ubd_new_disk failed to make link from %s to "
650 "%s, error = %d\n", from, to, err);
651 }
652 else {
653 sprintf(disk->disk_name, "ubd_fake%d", unit); 643 sprintf(disk->disk_name, "ubd_fake%d", unit);
654 sprintf(disk->devfs_name, "ubd_fake/disc%d", unit);
655 }
656 644
657 /* sysfs register (not for ide fake devices) */ 645 /* sysfs register (not for ide fake devices) */
658 if (major == MAJOR_NR) { 646 if (major == MAJOR_NR) {
@@ -841,7 +829,6 @@ int ubd_init(void)
841{ 829{
842 int i; 830 int i;
843 831
844 devfs_mk_dir("ubd");
845 if (register_blkdev(MAJOR_NR, "ubd")) 832 if (register_blkdev(MAJOR_NR, "ubd"))
846 return -1; 833 return -1;
847 834
@@ -855,7 +842,6 @@ int ubd_init(void)
855 char name[sizeof("ubd_nnn\0")]; 842 char name[sizeof("ubd_nnn\0")];
856 843
857 snprintf(name, sizeof(name), "ubd_%d", fake_major); 844 snprintf(name, sizeof(name), "ubd_%d", fake_major);
858 devfs_mk_dir(name);
859 if (register_blkdev(fake_major, "ubd")) 845 if (register_blkdev(fake_major, "ubd"))
860 return -1; 846 return -1;
861 } 847 }