diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-26 20:13:03 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-26 20:13:03 +0100 |
commit | f01393e48c44e30f7c9a36c8b98a07b0232580fe (patch) | |
tree | d585310ef7ee6509285a96b849af2e544e5fea25 /drivers/ide/ide-probe.c | |
parent | 6dd9b8376adbee95ddc321cc83c7f641577e01f6 (diff) |
ide: merge ->fixup and ->quirkproc methods
* Assign drive->quirk_list in ->quirkproc implementations:
- hpt366.c::hpt3xx_quirkproc()
- pdc202xx_new.c::pdcnew_quirkproc()
- pdc202xx_old.c::pdc202xx_quirkproc()
* Make ->quirkproc void.
* Move calling ->quirkproc from do_identify() to probe_hwif().
* Convert it821x_fixups() to it821x_quirkproc() in it821x.c.
* Convert siimage_fixup() to sil_quirkproc() in siimage.c, also remove
no longer needed drive->present check from is_dev_seagate_sata().
* Convert ide_undecoded_slave() to accept 'drive' instead of 'hwif'
as an argument. Then convert ide_register_hw() to accept 'quirkproc'
argument instead of 'fixup' one.
* Remove no longer needed ->fixup method.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index fa95e79b9505..c446e348e29a 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -235,9 +235,6 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) drive->media = ide_disk; printk("%s DISK drive\n", (id->config == 0x848a) ? "CFA" : "ATA" ); - if (hwif->quirkproc) - drive->quirk_list = hwif->quirkproc(drive); - return; err_misc: @@ -676,19 +673,18 @@ out: /** * ide_undecoded_slave - look for bad CF adapters - * @hwif: interface + * @drive1: drive * * Analyse the drives on the interface and attempt to decide if we * have the same drive viewed twice. This occurs with crap CF adapters * and PCMCIA sometimes. */ -void ide_undecoded_slave(ide_hwif_t *hwif) +void ide_undecoded_slave(ide_drive_t *drive1) { - ide_drive_t *drive0 = &hwif->drives[0]; - ide_drive_t *drive1 = &hwif->drives[1]; + ide_drive_t *drive0 = &drive1->hwif->drives[0]; - if (drive0->present == 0 || drive1->present == 0) + if ((drive1->dn & 1) == 0 || drive0->present == 0) return; /* If the models don't match they are not the same product */ @@ -817,8 +813,12 @@ static void probe_hwif(ide_hwif_t *hwif) return; } - if (hwif->fixup) - hwif->fixup(hwif); + for (unit = 0; unit < MAX_DRIVES; unit++) { + ide_drive_t *drive = &hwif->drives[unit]; + + if (drive->present && hwif->quirkproc) + hwif->quirkproc(drive); + } for (unit = 0; unit < MAX_DRIVES; ++unit) { ide_drive_t *drive = &hwif->drives[unit]; |