Skip to content

Commit

Permalink
[PATCH] devfs: Remove devfs from the partition code
Browse files Browse the repository at this point in the history
This patch removes the devfs code from the fs/partitions/ directory.

Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Jun 26, 2006
1 parent 5c3927d commit a296418
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 162 deletions.
1 change: 0 additions & 1 deletion fs/partitions/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

obj-y := check.o

obj-$(CONFIG_DEVFS_FS) += devfs.o
obj-$(CONFIG_ACORN_PARTITION) += acorn.o
obj-$(CONFIG_AMIGA_PARTITION) += amiga.o
obj-$(CONFIG_ATARI_PARTITION) += atari.o
Expand Down
26 changes: 5 additions & 21 deletions fs/partitions/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <linux/devfs_fs_kernel.h>

#include "check.h"
#include "devfs.h"

#include "acorn.h"
#include "amiga.h"
Expand Down Expand Up @@ -161,18 +160,11 @@ check_partition(struct gendisk *hd, struct block_device *bdev)
if (!state)
return NULL;

#ifdef CONFIG_DEVFS_FS
if (hd->devfs_name[0] != '\0') {
printk(KERN_INFO " /dev/%s:", hd->devfs_name);
disk_name(hd, 0, state->name);
printk(KERN_INFO " %s:", state->name);
if (isdigit(state->name[strlen(state->name)-1]))
sprintf(state->name, "p");
}
#endif
else {
disk_name(hd, 0, state->name);
printk(KERN_INFO " %s:", state->name);
if (isdigit(state->name[strlen(state->name)-1]))
sprintf(state->name, "p");
}

state->limit = hd->minors;
i = res = 0;
while (!res && check_part[i]) {
Expand Down Expand Up @@ -423,14 +415,8 @@ void register_disk(struct gendisk *disk)
disk_sysfs_add_subdirs(disk);

/* No minors to use for partitions */
if (disk->minors == 1) {
if (disk->devfs_name[0] != '\0')
devfs_add_disk(disk);
if (disk->minors == 1)
goto exit;
}

/* always add handle for the whole disk */
devfs_add_partitioned(disk);

/* No such device (e.g., media were just removed) */
if (!get_capacity(disk))
Expand Down Expand Up @@ -538,8 +524,6 @@ void del_gendisk(struct gendisk *disk)
disk_stat_set_all(disk, 0);
disk->stamp = 0;

devfs_remove_disk(disk);

kobject_uevent(&disk->kobj, KOBJ_REMOVE);
if (disk->holder_dir)
kobject_unregister(disk->holder_dir);
Expand Down
130 changes: 0 additions & 130 deletions fs/partitions/devfs.c

This file was deleted.

10 changes: 0 additions & 10 deletions fs/partitions/devfs.h

This file was deleted.

0 comments on commit a296418

Please sign in to comment.