diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-26 14:13:06 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-26 14:13:06 -0500 |
commit | cbb010c180294a5242a7681555c28737d9dd26ab (patch) | |
tree | 073883d1dc672bb38021563ca0d9cd762cd5abf2 /drivers/ide/h8300/ide-h8300.c | |
parent | 57c802e84f9c759c3d1794a9dbe81bc10444df62 (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/h8300/ide-h8300.c')
-rw-r--r-- | drivers/ide/h8300/ide-h8300.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c index 4a49b5c59acb..57d0d4ce8588 100644 --- a/drivers/ide/h8300/ide-h8300.c +++ b/drivers/ide/h8300/ide-h8300.c | |||
@@ -88,7 +88,7 @@ void __init h8300_ide_init(void) | |||
88 | { | 88 | { |
89 | hw_regs_t hw; | 89 | hw_regs_t hw; |
90 | ide_hwif_t *hwif; | 90 | ide_hwif_t *hwif; |
91 | int idx; | 91 | int index; |
92 | 92 | ||
93 | if (!request_region(CONFIG_H8300_IDE_BASE, H8300_IDE_GAP*8, "ide-h8300")) | 93 | if (!request_region(CONFIG_H8300_IDE_BASE, H8300_IDE_GAP*8, "ide-h8300")) |
94 | goto out_busy; | 94 | goto out_busy; |
@@ -100,14 +100,17 @@ void __init h8300_ide_init(void) | |||
100 | hw_setup(&hw); | 100 | hw_setup(&hw); |
101 | 101 | ||
102 | /* register if */ | 102 | /* register if */ |
103 | idx = ide_register_hw(&hw, NULL, 1, &hwif); | 103 | hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]); |
104 | if (idx == -1) { | 104 | if (hwif == NULL) { |
105 | printk(KERN_ERR "ide-h8300: IDE I/F register failed\n"); | 105 | printk(KERN_ERR "ide-h8300: IDE I/F register failed\n"); |
106 | return; | 106 | return; |
107 | } | 107 | } |
108 | 108 | ||
109 | index = hwif->index; | ||
110 | ide_init_port_data(hwif, index); | ||
111 | ide_init_port_hw(hwif, &hw); | ||
109 | hwif_setup(hwif); | 112 | hwif_setup(hwif); |
110 | printk(KERN_INFO "ide%d: H8/300 generic IDE interface\n", idx); | 113 | printk(KERN_INFO "ide%d: H8/300 generic IDE interface\n", index); |
111 | return; | 114 | return; |
112 | 115 | ||
113 | out_busy: | 116 | out_busy: |