diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:19 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:19 -0400 |
commit | 4dde4492d850a4c9bcaa92e5bd7f4eebe3e2f5ab (patch) | |
tree | ee3be70390e4c617b44329edef0a05039f59c81a /drivers/ide/ide-acpi.c | |
parent | 5b90e990928919ae411a68b865e8a6ecac09a603 (diff) |
ide: make drive->id an union (take 2)
Make drive->id an unnamed union so id can be accessed either by using
'u16 *id' or 'struct hd_driveid *driveid'. Then convert all existing
drive->id users accordingly (using 'u16 *id' when possible).
This is an intermediate step to make ide 'struct hd_driveid'-free.
While at it:
- Add missing KERN_CONTs in it821x.c.
- Use ATA_ID_WORDS and ATA_ID_*_LEN defines.
- Remove unnecessary checks for drive->id.
- s/drive_table/table/ in ide_in_drive_list().
- Cleanup ide_config_drive_speed() a bit.
- s/drive1/dev1/ & s/drive0/dev0/ in ide_undecoded_slave().
v2:
Fix typo in drivers/ide/ppc/pmac.c. (From Stephen Rothwell)
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-acpi.c')
-rw-r--r-- | drivers/ide/ide-acpi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 6f704628c27d..2427c380b3dc 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c | |||
@@ -584,7 +584,7 @@ void ide_acpi_get_timing(ide_hwif_t *hwif) | |||
584 | * This function executes the _STM ACPI method for the target channel. | 584 | * This function executes the _STM ACPI method for the target channel. |
585 | * | 585 | * |
586 | * _STM requires Identify Drive data, which has to passed as an argument. | 586 | * _STM requires Identify Drive data, which has to passed as an argument. |
587 | * Unfortunately hd_driveid is a mangled version which we can't readily | 587 | * Unfortunately drive->id is a mangled version which we can't readily |
588 | * use; hence we'll get the information afresh. | 588 | * use; hence we'll get the information afresh. |
589 | */ | 589 | */ |
590 | void ide_acpi_push_timing(ide_hwif_t *hwif) | 590 | void ide_acpi_push_timing(ide_hwif_t *hwif) |
@@ -614,10 +614,10 @@ void ide_acpi_push_timing(ide_hwif_t *hwif) | |||
614 | in_params[0].buffer.length = sizeof(struct GTM_buffer); | 614 | in_params[0].buffer.length = sizeof(struct GTM_buffer); |
615 | in_params[0].buffer.pointer = (u8 *)&hwif->acpidata->gtm; | 615 | in_params[0].buffer.pointer = (u8 *)&hwif->acpidata->gtm; |
616 | in_params[1].type = ACPI_TYPE_BUFFER; | 616 | in_params[1].type = ACPI_TYPE_BUFFER; |
617 | in_params[1].buffer.length = sizeof(struct hd_driveid); | 617 | in_params[1].buffer.length = sizeof(ATA_ID_WORDS * 2); |
618 | in_params[1].buffer.pointer = (u8 *)&master->idbuff; | 618 | in_params[1].buffer.pointer = (u8 *)&master->idbuff; |
619 | in_params[2].type = ACPI_TYPE_BUFFER; | 619 | in_params[2].type = ACPI_TYPE_BUFFER; |
620 | in_params[2].buffer.length = sizeof(struct hd_driveid); | 620 | in_params[2].buffer.length = sizeof(ATA_ID_WORDS * 2); |
621 | in_params[2].buffer.pointer = (u8 *)&slave->idbuff; | 621 | in_params[2].buffer.pointer = (u8 *)&slave->idbuff; |
622 | /* Output buffer: _STM has no output */ | 622 | /* Output buffer: _STM has no output */ |
623 | 623 | ||