mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 22:28:00 +00:00
ide: cleanup ide_disk_init_mult_count()
* Remove superfluous checks for drive->mult_req. * No need to zero drive's fields. * Move the common code out of #ifdef scope. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
f8881000d7
commit
df1f8378c2
1 changed files with 10 additions and 11 deletions
|
@ -89,20 +89,19 @@ static void ide_disk_init_mult_count(ide_drive_t *drive)
|
||||||
{
|
{
|
||||||
struct hd_driveid *id = drive->id;
|
struct hd_driveid *id = drive->id;
|
||||||
|
|
||||||
drive->mult_count = 0;
|
|
||||||
if (id->max_multsect) {
|
if (id->max_multsect) {
|
||||||
#ifdef CONFIG_IDEDISK_MULTI_MODE
|
#ifdef CONFIG_IDEDISK_MULTI_MODE
|
||||||
id->multsect = ((id->max_multsect/2) > 1) ? id->max_multsect : 0;
|
if ((id->max_multsect / 2) > 1) {
|
||||||
id->multsect_valid = id->multsect ? 1 : 0;
|
id->multsect = id->max_multsect;
|
||||||
drive->mult_req = id->multsect_valid ? id->max_multsect : 0;
|
id->multsect_valid = 1;
|
||||||
drive->special.b.set_multmode = drive->mult_req ? 1 : 0;
|
} else {
|
||||||
#else /* original, pre IDE-NFG, per request of AC */
|
id->multsect = 0;
|
||||||
drive->mult_req = 0;
|
id->multsect_valid = 0;
|
||||||
if (drive->mult_req > id->max_multsect)
|
}
|
||||||
drive->mult_req = id->max_multsect;
|
drive->mult_req = id->multsect;
|
||||||
if (drive->mult_req || ((id->multsect_valid & 1) && id->multsect))
|
|
||||||
drive->special.b.set_multmode = 1;
|
|
||||||
#endif
|
#endif
|
||||||
|
if ((id->multsect_valid & 1) && id->multsect)
|
||||||
|
drive->special.b.set_multmode = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue