diff options
Diffstat (limited to 'drivers/ide/arm/bast-ide.c')
-rw-r--r-- | drivers/ide/arm/bast-ide.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c index 037300fa284c..0e7574c0ee60 100644 --- a/drivers/ide/arm/bast-ide.c +++ b/drivers/ide/arm/bast-ide.c | |||
@@ -28,8 +28,10 @@ static int __init | |||
28 | bastide_register(unsigned int base, unsigned int aux, int irq, | 28 | bastide_register(unsigned int base, unsigned int aux, int irq, |
29 | ide_hwif_t **hwif) | 29 | ide_hwif_t **hwif) |
30 | { | 30 | { |
31 | ide_hwif_t *hwif; | ||
31 | hw_regs_t hw; | 32 | hw_regs_t hw; |
32 | int i; | 33 | int i; |
34 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
33 | 35 | ||
34 | memset(&hw, 0, sizeof(hw)); | 36 | memset(&hw, 0, sizeof(hw)); |
35 | 37 | ||
@@ -44,8 +46,24 @@ bastide_register(unsigned int base, unsigned int aux, int irq, | |||
44 | hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20); | 46 | hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20); |
45 | hw.irq = irq; | 47 | hw.irq = irq; |
46 | 48 | ||
47 | ide_register_hw(&hw, NULL, hwif); | 49 | hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]); |
50 | if (hwif == NULL) | ||
51 | goto out; | ||
48 | 52 | ||
53 | i = hwif->index; | ||
54 | |||
55 | if (hwif->present) | ||
56 | ide_unregister(i, 0, 0); | ||
57 | else if (!hwif->hold) | ||
58 | ide_init_port_data(hwif, i); | ||
59 | |||
60 | ide_init_port_hw(hwif, &hw); | ||
61 | hwif->quirkproc = NULL; | ||
62 | |||
63 | idx[0] = i; | ||
64 | |||
65 | ide_device_add(idx, NULL); | ||
66 | out: | ||
49 | return 0; | 67 | return 0; |
50 | } | 68 | } |
51 | 69 | ||