summaryrefslogtreecommitdiff
path: root/drivers/ide/arm
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 20:13:06 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 20:13:06 +0100
commitcbb010c180294a5242a7681555c28737d9dd26ab (patch)
tree073883d1dc672bb38021563ca0d9cd762cd5abf2 /drivers/ide/arm
parent57c802e84f9c759c3d1794a9dbe81bc10444df62 (diff)
ide: drop 'initializing' argument from ide_register_hw()
* Rename init_hwif_data() to ide_init_port_data() and export it. * For all users of ide_register_hw() with 'initializing' argument set hwif->present and hwif->hold are always zero so convert these host drivers to use ide_find_port()+ide_init_port_data()+ide_init_port_hw() instead (also no need for init_hwif_default() call since the setup done by it gets over-ridden by ide_init_port_hw() call). * Drop 'initializing' argument from ide_register_hw(). Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/arm')
-rw-r--r--drivers/ide/arm/bast-ide.c2
-rw-r--r--drivers/ide/arm/ide_arm.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c
index 48db6167bb90..45bf9c825f2b 100644
--- a/drivers/ide/arm/bast-ide.c
+++ b/drivers/ide/arm/bast-ide.c
@@ -45,7 +45,7 @@ bastide_register(unsigned int base, unsigned int aux, int irq,
hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20);
hw.irq = irq;
- ide_register_hw(&hw, NULL, 0, hwif);
+ ide_register_hw(&hw, NULL, hwif);
return 0;
}
diff --git a/drivers/ide/arm/ide_arm.c b/drivers/ide/arm/ide_arm.c
index 8957cbadf5c2..1a03a2a285ef 100644
--- a/drivers/ide/arm/ide_arm.c
+++ b/drivers/ide/arm/ide_arm.c
@@ -26,10 +26,16 @@
void __init ide_arm_init(void)
{
+ ide_hwif_t *hwif;
hw_regs_t hw;
memset(&hw, 0, sizeof(hw));
ide_std_init_ports(&hw, IDE_ARM_IO, IDE_ARM_IO + 0x206);
hw.irq = IDE_ARM_IRQ;
- ide_register_hw(&hw, NULL, 1, NULL);
+
+ hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
+ if (hwif) {
+ ide_init_port_data(hwif, hwif->index);
+ ide_init_port_hw(hwif, &hw);
+ }
}