Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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)) {
+0 −2
Original line number Diff line number Diff line
@@ -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));
+0 −1
Original line number Diff line number Diff line
@@ -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;
+0 −11
Original line number Diff line number Diff line
@@ -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);
+0 −12
Original line number Diff line number Diff line
@@ -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);

Loading