[PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed
And remove the now unneeded number field. Also fixes all drivers that set these fields. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
96192ff1a9
commit
ce7b0f46bb
29 changed files with 5 additions and 47 deletions
|
@ -637,14 +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);
|
||||
}
|
||||
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) {
|
||||
|
|
|
@ -2530,7 +2530,6 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
|
|||
blk_queue_max_sectors(RequestQueue, Controller->MaxBlocksPerCommand);
|
||||
disk->queue = RequestQueue;
|
||||
sprintf(disk->disk_name, "rd/c%dd%d", Controller->ControllerNumber, n);
|
||||
sprintf(disk->devfs_name, "rd/host%d/target%d", Controller->ControllerNumber, n);
|
||||
disk->major = MajorNumber;
|
||||
disk->first_minor = n << DAC960_MaxPartitionsBits;
|
||||
disk->fops = &DAC960_BlockDeviceOperations;
|
||||
|
|
|
@ -1732,13 +1732,10 @@ int acsi_init( void )
|
|||
struct gendisk *disk = acsi_gendisk[i];
|
||||
sprintf(disk->disk_name, "ad%c", 'a'+i);
|
||||
aip = &acsi_info[NDevices];
|
||||
sprintf(disk->devfs_name, "ad/target%d/lun%d", aip->target, aip->lun);
|
||||
disk->major = ACSI_MAJOR;
|
||||
disk->first_minor = i << 4;
|
||||
if (acsi_info[i].type != HARDDISK) {
|
||||
if (acsi_info[i].type != HARDDISK)
|
||||
disk->minors = 1;
|
||||
strcat(disk->devfs_name, "/disc");
|
||||
}
|
||||
disk->fops = &acsi_fops;
|
||||
disk->private_data = &acsi_info[i];
|
||||
set_capacity(disk, acsi_info[i].size);
|
||||
|
|
|
@ -3248,7 +3248,6 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
|
|||
|
||||
q->queuedata = hba[i];
|
||||
sprintf(disk->disk_name, "cciss/c%dd%d", i, j);
|
||||
sprintf(disk->devfs_name, "cciss/host%d/target%d", i, j);
|
||||
disk->major = hba[i]->major;
|
||||
disk->first_minor = j << NWD_SHIFT;
|
||||
disk->fops = &cciss_fops;
|
||||
|
|
|
@ -1805,8 +1805,6 @@ static void getgeometry(int ctlr)
|
|||
|
||||
}
|
||||
|
||||
sprintf(disk->devfs_name, "ida/c%dd%d", ctlr, log_unit);
|
||||
|
||||
info_p->phys_drives =
|
||||
sense_config_buf->ctlr_phys_drv;
|
||||
info_p->drv_assign_map
|
||||
|
|
|
@ -1293,7 +1293,6 @@ static int __init loop_init(void)
|
|||
disk->first_minor = i;
|
||||
disk->fops = &lo_fops;
|
||||
sprintf(disk->disk_name, "loop%d", i);
|
||||
sprintf(disk->devfs_name, "loop/%d", i);
|
||||
disk->private_data = lo;
|
||||
disk->queue = lo->lo_queue;
|
||||
}
|
||||
|
|
|
@ -657,7 +657,6 @@ static int __init nbd_init(void)
|
|||
disk->private_data = &nbd_dev[i];
|
||||
disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
|
||||
sprintf(disk->disk_name, "nbd%d", i);
|
||||
sprintf(disk->devfs_name, "nbd/%d", i);
|
||||
set_capacity(disk, 0x7ffffc00ULL << 1); /* 2 TB */
|
||||
add_disk(disk);
|
||||
}
|
||||
|
|
|
@ -421,7 +421,6 @@ static int __init ps2esdi_geninit(void)
|
|||
disk->major = PS2ESDI_MAJOR;
|
||||
disk->first_minor = i<<6;
|
||||
sprintf(disk->disk_name, "ed%c", 'a'+i);
|
||||
sprintf(disk->devfs_name, "ed/target%d", i);
|
||||
disk->fops = &ps2esdi_fops;
|
||||
ps2esdi_gendisk[i] = disk;
|
||||
}
|
||||
|
|
|
@ -457,7 +457,6 @@ static int __init rd_init(void)
|
|||
disk->queue = rd_queue[i];
|
||||
disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
|
||||
sprintf(disk->disk_name, "ram%d", i);
|
||||
sprintf(disk->devfs_name, "rd/%d", i);
|
||||
set_capacity(disk, rd_size * 2);
|
||||
add_disk(rd_disks[i]);
|
||||
}
|
||||
|
|
|
@ -1061,7 +1061,6 @@ int swim3_init(void)
|
|||
disk->queue = swim3_queue;
|
||||
disk->flags |= GENHD_FL_REMOVABLE;
|
||||
sprintf(disk->disk_name, "fd%d", i);
|
||||
sprintf(disk->devfs_name, "floppy/%d", i);
|
||||
set_capacity(disk, 2880);
|
||||
add_disk(disk);
|
||||
}
|
||||
|
|
|
@ -1509,7 +1509,6 @@ static int carm_init_disks(struct carm_host *host)
|
|||
port->disk = disk;
|
||||
sprintf(disk->disk_name, DRV_NAME "/%u",
|
||||
(unsigned int) (host->id * CARM_MAX_PORTS) + i);
|
||||
sprintf(disk->devfs_name, DRV_NAME "/%u_%u", host->id, i);
|
||||
disk->major = host->major;
|
||||
disk->first_minor = i * CARM_MINORS_PER_MAJOR;
|
||||
disk->fops = &carm_bd_ops;
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <scsi/scsi.h>
|
||||
|
||||
#define DRV_NAME "ub"
|
||||
#define DEVFS_NAME DRV_NAME
|
||||
|
||||
#define UB_MAJOR 180
|
||||
|
||||
|
@ -2290,7 +2289,6 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum)
|
|||
goto err_diskalloc;
|
||||
|
||||
sprintf(disk->disk_name, DRV_NAME "%c", lun->id + 'a');
|
||||
sprintf(disk->devfs_name, DEVFS_NAME "/%c", lun->id + 'a');
|
||||
disk->major = UB_MAJOR;
|
||||
disk->first_minor = lun->id * UB_PARTS_PER_LUN;
|
||||
disk->fops = &ub_bd_fops;
|
||||
|
|
|
@ -1192,7 +1192,6 @@ static int __init mm_init(void)
|
|||
for (i = 0; i < num_cards; i++) {
|
||||
struct gendisk *disk = mm_gendisk[i];
|
||||
sprintf(disk->disk_name, "umem%c", 'a'+i);
|
||||
sprintf(disk->devfs_name, "umem/card%d", i);
|
||||
spin_lock_init(&cards[i].lock);
|
||||
disk->major = major_nr;
|
||||
disk->first_minor = i << MM_SHIFT;
|
||||
|
|
|
@ -523,8 +523,6 @@ static void probe_disk(struct viodasd_device *d)
|
|||
else
|
||||
snprintf(g->disk_name, sizeof(g->disk_name),
|
||||
VIOD_GENHD_NAME "%c", 'a' + (dev_no % 26));
|
||||
snprintf(g->devfs_name, sizeof(g->devfs_name),
|
||||
"%s%d", VIOD_GENHD_DEVFS_NAME, dev_no);
|
||||
g->fops = &viodasd_fops;
|
||||
g->queue = q;
|
||||
g->private_data = d;
|
||||
|
|
|
@ -215,7 +215,6 @@ static int __init xd_init(void)
|
|||
disk->major = XT_DISK_MAJOR;
|
||||
disk->first_minor = i<<6;
|
||||
sprintf(disk->disk_name, "xd%c", i+'a');
|
||||
sprintf(disk->devfs_name, "xd/target%d", i);
|
||||
disk->fops = &xd_fops;
|
||||
disk->private_data = p;
|
||||
disk->queue = xd_queue;
|
||||
|
|
|
@ -354,7 +354,6 @@ z2_init(void)
|
|||
z2ram_gendisk->first_minor = 0;
|
||||
z2ram_gendisk->fops = &z2_fops;
|
||||
sprintf(z2ram_gendisk->disk_name, "z2ram");
|
||||
strcpy(z2ram_gendisk->devfs_name, z2ram_gendisk->disk_name);
|
||||
|
||||
z2ram_gendisk->queue = z2_queue;
|
||||
add_disk(z2ram_gendisk);
|
||||
|
|
|
@ -1918,7 +1918,6 @@ static int __init aztcd_init(void)
|
|||
azt_disk->first_minor = 0;
|
||||
azt_disk->fops = &azt_fops;
|
||||
sprintf(azt_disk->disk_name, "aztcd");
|
||||
sprintf(azt_disk->devfs_name, "aztcd");
|
||||
azt_disk->queue = azt_queue;
|
||||
add_disk(azt_disk);
|
||||
azt_invalidate_buffers();
|
||||
|
|
|
@ -955,7 +955,6 @@ static int __init gscd_init(void)
|
|||
gscd_disk->first_minor = 0;
|
||||
gscd_disk->fops = &gscd_fops;
|
||||
sprintf(gscd_disk->disk_name, "gscd");
|
||||
sprintf(gscd_disk->devfs_name, "gscd");
|
||||
|
||||
if (register_blkdev(MAJOR_NR, "gscd")) {
|
||||
ret = -EIO;
|
||||
|
|
|
@ -2033,7 +2033,6 @@ static int __init optcd_init(void)
|
|||
optcd_disk->first_minor = 0;
|
||||
optcd_disk->fops = &opt_fops;
|
||||
sprintf(optcd_disk->disk_name, "optcd");
|
||||
sprintf(optcd_disk->devfs_name, "optcd");
|
||||
|
||||
if (!request_region(optcd_port, 4, "optcd")) {
|
||||
printk(KERN_ERR "optcd: conflict, I/O port 0x%x already used\n",
|
||||
|
|
|
@ -5868,7 +5868,6 @@ int __init sbpcd_init(void)
|
|||
disk->fops = &sbpcd_bdops;
|
||||
strcpy(disk->disk_name, sbpcd_infop->name);
|
||||
disk->flags = GENHD_FL_CD;
|
||||
sprintf(disk->devfs_name, "sbp/c0t%d", p->drv_id);
|
||||
p->disk = disk;
|
||||
if (register_cdrom(sbpcd_infop))
|
||||
{
|
||||
|
|
|
@ -1695,7 +1695,6 @@ static int __init sjcd_init(void)
|
|||
sjcd_disk->first_minor = 0,
|
||||
sjcd_disk->fops = &sjcd_fops,
|
||||
sprintf(sjcd_disk->disk_name, "sjcd");
|
||||
sprintf(sjcd_disk->devfs_name, "sjcd");
|
||||
|
||||
if (!request_region(sjcd_base, 4,"sjcd")) {
|
||||
printk
|
||||
|
|
|
@ -1589,7 +1589,6 @@ static int __init sony535_init(void)
|
|||
cdu_disk->first_minor = 0;
|
||||
cdu_disk->fops = &cdu_fops;
|
||||
sprintf(cdu_disk->disk_name, "cdu");
|
||||
sprintf(cdu_disk->devfs_name, "cdu535");
|
||||
|
||||
if (!request_region(sony535_cd_base_io, 4, CDU535_HANDLE)) {
|
||||
printk(KERN_WARNING"sonycd535: Unable to request region 0x%x\n",
|
||||
|
|
|
@ -688,8 +688,6 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
|||
gendisk->first_minor = deviceno;
|
||||
strncpy(gendisk->disk_name, c->name,
|
||||
sizeof(gendisk->disk_name));
|
||||
snprintf(gendisk->devfs_name, sizeof(gendisk->devfs_name),
|
||||
VIOCD_DEVICE_DEVFS "%d", deviceno);
|
||||
blk_queue_max_hw_segments(q, 1);
|
||||
blk_queue_max_phys_segments(q, 1);
|
||||
blk_queue_max_sectors(q, 4096 / 512);
|
||||
|
|
|
@ -2910,13 +2910,10 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data)
|
|||
}
|
||||
disk->major = MAJOR(dev);
|
||||
disk->first_minor = unit << shift;
|
||||
if (partitioned) {
|
||||
if (partitioned)
|
||||
sprintf(disk->disk_name, "md_d%d", unit);
|
||||
sprintf(disk->devfs_name, "md/d%d", unit);
|
||||
} else {
|
||||
else
|
||||
sprintf(disk->disk_name, "md%d", unit);
|
||||
sprintf(disk->devfs_name, "md/%d", unit);
|
||||
}
|
||||
disk->fops = &md_fops;
|
||||
disk->private_data = mddev;
|
||||
disk->queue = mddev->queue;
|
||||
|
|
|
@ -1089,7 +1089,6 @@ static int i2o_block_probe(struct device *dev)
|
|||
gd = i2o_blk_dev->gd;
|
||||
gd->first_minor = unit << 4;
|
||||
sprintf(gd->disk_name, "i2o/hd%c", 'a' + unit);
|
||||
sprintf(gd->devfs_name, "i2o/hd%c", 'a' + unit);
|
||||
gd->driverfs_dev = &i2o_dev->device;
|
||||
|
||||
/* setup request queue */
|
||||
|
|
|
@ -408,7 +408,6 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
|
|||
*/
|
||||
|
||||
sprintf(md->disk->disk_name, "mmcblk%d", devidx);
|
||||
sprintf(md->disk->devfs_name, "mmc/blk%d", devidx);
|
||||
|
||||
blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits);
|
||||
|
||||
|
|
|
@ -68,8 +68,6 @@ dasd_gendisk_alloc(struct dasd_device *device)
|
|||
}
|
||||
len += sprintf(gdp->disk_name + len, "%c", 'a'+(device->devindex%26));
|
||||
|
||||
sprintf(gdp->devfs_name, "dasd/%s", device->cdev->dev.bus_id);
|
||||
|
||||
if (device->features & DASD_FEATURE_READONLY)
|
||||
set_disk_ro(gdp, 1);
|
||||
gdp->private_data = device;
|
||||
|
|
|
@ -466,7 +466,6 @@ static int __init xpram_setup_blkdev(void)
|
|||
disk->private_data = &xpram_devices[i];
|
||||
disk->queue = xpram_queue;
|
||||
sprintf(disk->disk_name, "slram%d", i);
|
||||
sprintf(disk->devfs_name, "slram/%d", i);
|
||||
set_capacity(disk, xpram_sizes[i] << 1);
|
||||
add_disk(disk);
|
||||
}
|
||||
|
|
|
@ -112,8 +112,6 @@ struct gendisk {
|
|||
sector_t capacity;
|
||||
|
||||
int flags;
|
||||
char devfs_name[64]; /* devfs crap */
|
||||
int number; /* more of the same */
|
||||
struct device *driverfs_dev;
|
||||
struct kobject kobj;
|
||||
struct kobject *holder_dir;
|
||||
|
|
Loading…
Reference in a new issue