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>
This commit is contained in:
Bartlomiej Zolnierkiewicz
2008-01-26 20:13:03 +01:00
parent 6dd9b8376a
commit f01393e48c
9 changed files with 57 additions and 68 deletions

View File

@@ -414,8 +414,6 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
hwif->cds = tmp_hwif->cds;
#endif
hwif->fixup = tmp_hwif->fixup;
hwif->set_pio_mode = tmp_hwif->set_pio_mode;
hwif->set_dma_mode = tmp_hwif->set_dma_mode;
hwif->mdma_filter = tmp_hwif->mdma_filter;
@@ -680,7 +678,7 @@ void ide_setup_ports ( hw_regs_t *hw,
/**
* ide_register_hw - register IDE interface
* @hw: hardware registers
* @fixup: fixup function
* @quirkproc: quirkproc function
* @initializing: set while initializing built-in drivers
* @hwifp: pointer to returned hwif
*
@@ -690,7 +688,7 @@ void ide_setup_ports ( hw_regs_t *hw,
* Returns -1 on error.
*/
int ide_register_hw(hw_regs_t *hw, void (*fixup)(ide_hwif_t *),
int ide_register_hw(hw_regs_t *hw, void (*quirkproc)(ide_drive_t *),
int initializing, ide_hwif_t **hwifp)
{
int index, retry = 1;
@@ -726,7 +724,7 @@ found:
memcpy(hwif->io_ports, hw->io_ports, sizeof(hwif->io_ports));
hwif->irq = hw->irq;
hwif->noprobe = 0;
hwif->fixup = fixup;
hwif->quirkproc = quirkproc;
hwif->chipset = hw->chipset;
hwif->gendev.parent = hw->dev;
hwif->ack_intr = hw->ack_intr;