Commit fa6ead8c authored by Alexander Viro's avatar Alexander Viro Committed by Ben Collins

[PATCH] ->minor_shift removal

disk->minor_shift is not used anymore.  Remove it.
parent 59e55019
......@@ -1728,10 +1728,8 @@ int acsi_init( void )
sprintf(disk->disk_name, "ad%c", 'a'+i);
disk->major = ACSI_MAJOR;
disk->first_minor = i << 4;
if (acsi_info[i].type != HARDDISK) {
disk->minor_shift = 0;
if (acsi_info[i].type != HARDDISK)
disk->minors = 1;
}
disk->fops = &acsi_fops;
disk->private_data = &acsi_info[i];
set_capacity(disk, acsi_info[i].size);
......
......@@ -538,8 +538,6 @@ struct gendisk *alloc_disk(int minors)
memset(disk->part, 0, size);
}
disk->minors = minors;
while (minors >>= 1)
disk->minor_shift++;
kobj_set_kset_s(disk,block_subsys);
kobject_init(&disk->kobj);
rand_initialize_disk(disk);
......
......@@ -3376,7 +3376,6 @@ static int ide_cdrom_attach (ide_drive_t *drive)
drive->driver_data = info;
DRIVER(drive)->busy++;
g->minors = 1;
g->minor_shift = 0;
snprintf(g->devfs_name, sizeof(g->devfs_name),
"%s/cd", drive->devfs_name);
g->driverfs_dev = &drive->gendev;
......
......@@ -1814,7 +1814,6 @@ static int idedisk_attach(ide_drive_t *drive)
}
DRIVER(drive)->busy--;
g->minors = 1 << PARTN_BITS;
g->minor_shift = PARTN_BITS;
strcpy(g->devfs_name, drive->devfs_name);
g->driverfs_dev = &drive->gendev;
g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
......
......@@ -2057,7 +2057,6 @@ static int idefloppy_attach (ide_drive_t *drive)
idefloppy_setup (drive, floppy);
DRIVER(drive)->busy--;
g->minors = 1 << PARTN_BITS;
g->minor_shift = PARTN_BITS;
g->driverfs_dev = &drive->gendev;
strcpy(g->devfs_name, drive->devfs_name);
g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0;
......
......@@ -83,8 +83,6 @@ struct gendisk {
int major; /* major number of driver */
int first_minor;
int minors;
int minor_shift; /* number of times minor is shifted to
get real minor */
char disk_name[16]; /* name of major driver */
struct hd_struct **part; /* [indexed by minor] */
struct block_device_operations *fops;
......
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