aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:03 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:03 -0500
commitf01393e48c44e30f7c9a36c8b98a07b0232580fe (patch)
treed585310ef7ee6509285a96b849af2e544e5fea25 /drivers/ide/ide-probe.c
parent6dd9b8376adbee95ddc321cc83c7f641577e01f6 (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.c20
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)
235 drive->media = ide_disk; 235 drive->media = ide_disk;
236 printk("%s DISK drive\n", (id->config == 0x848a) ? "CFA" : "ATA" ); 236 printk("%s DISK drive\n", (id->config == 0x848a) ? "CFA" : "ATA" );
237 237
238 if (hwif->quirkproc)
239 drive->quirk_list = hwif->quirkproc(drive);
240
241 return; 238 return;
242 239
243err_misc: 240err_misc:
@@ -676,19 +673,18 @@ out:
676 673
677/** 674/**
678 * ide_undecoded_slave - look for bad CF adapters 675 * ide_undecoded_slave - look for bad CF adapters
679 * @hwif: interface 676 * @drive1: drive
680 * 677 *
681 * Analyse the drives on the interface and attempt to decide if we 678 * Analyse the drives on the interface and attempt to decide if we
682 * have the same drive viewed twice. This occurs with crap CF adapters 679 * have the same drive viewed twice. This occurs with crap CF adapters
683 * and PCMCIA sometimes. 680 * and PCMCIA sometimes.
684 */ 681 */
685 682
686void ide_undecoded_slave(ide_hwif_t *hwif) 683void ide_undecoded_slave(ide_drive_t *drive1)
687{ 684{
688 ide_drive_t *drive0 = &hwif->drives[0]; 685 ide_drive_t *drive0 = &drive1->hwif->drives[0];
689 ide_drive_t *drive1 = &hwif->drives[1];
690 686
691 if (drive0->present == 0 || drive1->present == 0) 687 if ((drive1->dn & 1) == 0 || drive0->present == 0)
692 return; 688 return;
693 689
694 /* If the models don't match they are not the same product */ 690 /* If the models don't match they are not the same product */
@@ -817,8 +813,12 @@ static void probe_hwif(ide_hwif_t *hwif)
817 return; 813 return;
818 } 814 }
819 815
820 if (hwif->fixup) 816 for (unit = 0; unit < MAX_DRIVES; unit++) {
821 hwif->fixup(hwif); 817 ide_drive_t *drive = &hwif->drives[unit];
818
819 if (drive->present && hwif->quirkproc)
820 hwif->quirkproc(drive);
821 }
822 822
823 for (unit = 0; unit < MAX_DRIVES; ++unit) { 823 for (unit = 0; unit < MAX_DRIVES; ++unit) {
824 ide_drive_t *drive = &hwif->drives[unit]; 824 ide_drive_t *drive = &hwif->drives[unit];