Commit 94f6c59d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] devfs: Remove devfs support from the ide subsystem.

Also removes the ide drive devfs_name field as it's no longer needed
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent aa4148cf
......@@ -3527,8 +3527,6 @@ static int ide_cd_probe(ide_drive_t *drive)
drive->driver_data = info;
g->minors = 1;
snprintf(g->devfs_name, sizeof(g->devfs_name),
"%s/cd", drive->devfs_name);
g->driverfs_dev = &drive->gendev;
g->flags = GENHD_FL_CD | GENHD_FL_REMOVABLE;
if (ide_cdrom_setup(drive)) {
......
......@@ -1018,7 +1018,6 @@ static void ide_disk_release(struct kref *kref)
struct gendisk *g = idkp->disk;
drive->driver_data = NULL;
drive->devfs_name[0] = '\0';
g->private_data = NULL;
put_disk(g);
kfree(idkp);
......@@ -1222,7 +1221,6 @@ static int ide_disk_probe(ide_drive_t *drive)
drive->attach = 1;
g->minors = 1 << PARTN_BITS;
strcpy(g->devfs_name, drive->devfs_name);
g->driverfs_dev = &drive->gendev;
g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
set_capacity(g, idedisk_capacity(drive));
......
......@@ -2176,7 +2176,6 @@ static int ide_floppy_probe(ide_drive_t *drive)
g->minors = 1 << PARTN_BITS;
g->driverfs_dev = &drive->gendev;
strcpy(g->devfs_name, drive->devfs_name);
g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
g->fops = &idefloppy_ops;
drive->attach = 1;
......
......@@ -47,7 +47,6 @@
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/ide.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/spinlock.h>
#include <linux/kmod.h>
#include <linux/pci.h>
......@@ -1279,10 +1278,6 @@ static void drive_release_dev (struct device *dev)
ide_drive_t *drive = container_of(dev, ide_drive_t, gendev);
spin_lock_irq(&ide_lock);
if (drive->devfs_name[0] != '\0') {
devfs_remove(drive->devfs_name);
drive->devfs_name[0] = '\0';
}
ide_remove_drive_from_hwgroup(drive);
kfree(drive->id);
drive->id = NULL;
......@@ -1316,12 +1311,6 @@ static void init_gendisk (ide_hwif_t *hwif)
drive->gendev.bus = &ide_bus_type;
drive->gendev.driver_data = drive;
drive->gendev.release = drive_release_dev;
if (drive->present) {
sprintf(drive->devfs_name, "ide/host%d/bus%d/target%d/lun%d",
(hwif->channel && hwif->mate) ?
hwif->mate->index : hwif->index,
hwif->channel, unit, drive->lun);
}
}
blk_register_region(MKDEV(hwif->major, 0), MAX_DRIVES << PARTN_BITS,
THIS_MODULE, ata_probe, ata_lock, hwif);
......
......@@ -435,7 +435,6 @@
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/major.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/errno.h>
#include <linux/genhd.h>
#include <linux/slab.h>
......@@ -4726,9 +4725,6 @@ static void ide_tape_release(struct kref *kref)
MKDEV(IDETAPE_MAJOR, tape->minor));
class_device_destroy(idetape_sysfs_class,
MKDEV(IDETAPE_MAJOR, tape->minor + 128));
devfs_remove("%s/mt", drive->devfs_name);
devfs_remove("%s/mtn", drive->devfs_name);
devfs_unregister_tape(g->number);
idetape_devs[tape->minor] = NULL;
g->private_data = NULL;
put_disk(g);
......@@ -4902,14 +4898,6 @@ static int ide_tape_probe(ide_drive_t *drive)
class_device_create(idetape_sysfs_class, NULL,
MKDEV(IDETAPE_MAJOR, minor + 128), &drive->gendev, "n%s", tape->name);
devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor),
S_IFCHR | S_IRUGO | S_IWUGO,
"%s/mt", drive->devfs_name);
devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor + 128),
S_IFCHR | S_IRUGO | S_IWUGO,
"%s/mtn", drive->devfs_name);
g->number = devfs_register_tape(drive->devfs_name);
g->fops = &idetape_block_ops;
ide_register_region(g);
......
......@@ -147,7 +147,6 @@
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/ide.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/completion.h>
#include <linux/reboot.h>
#include <linux/cdrom.h>
......@@ -592,13 +591,8 @@ void ide_unregister(unsigned int index)
goto abort;
for (unit = 0; unit < MAX_DRIVES; ++unit) {
drive = &hwif->drives[unit];
if (!drive->present) {
if (drive->devfs_name[0] != '\0') {
devfs_remove(drive->devfs_name);
drive->devfs_name[0] = '\0';
}
if (!drive->present)
continue;
}
spin_unlock_irq(&ide_lock);
device_unregister(&drive->gendev);
wait_for_completion(&drive->gendev_rel_comp);
......@@ -1996,7 +1990,6 @@ EXPORT_SYMBOL_GPL(ide_bus_type);
static int __init ide_init(void)
{
printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n");
devfs_mk_dir("ide");
system_bus_speed = ide_system_bus_speed();
bus_register(&ide_bus_type);
......@@ -2074,7 +2067,6 @@ void cleanup_module (void)
#ifdef CONFIG_PROC_FS
proc_ide_destroy();
#endif
devfs_remove("ide");
bus_unregister(&ide_bus_type);
}
......
......@@ -552,7 +552,6 @@ typedef struct ide_drive_s {
struct hd_driveid *id; /* drive model identification info */
struct proc_dir_entry *proc; /* /proc/ide/ directory entry */
struct ide_settings_s *settings;/* /proc/ide/ drive settings */
char devfs_name[64]; /* devfs crap */
struct hwif_s *hwif; /* actually (ide_hwif_t *) */
......
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