aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:25 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:25 -0400
commite6bfa38a4803646e212ef542b957344e790c3733 (patch)
tree677e9eccad910361e2b38eb2e24765894a89b8ee
parent05734266c07ac588d1773bd9ae51a0ff20456443 (diff)
ide: remove ide_init_hwif_ports()
ide_init_hwif_ports() is only used by init_ide_data() now, inline it there. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide.c11
-rw-r--r--include/linux/ide.h32
2 files changed, 9 insertions, 34 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index a60b956db519..9e4d503bc716 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -197,13 +197,20 @@ static void __init init_ide_data (void)
197 /* Initialise all interface structures */ 197 /* Initialise all interface structures */
198 for (index = 0; index < MAX_HWIFS; ++index) { 198 for (index = 0; index < MAX_HWIFS; ++index) {
199 ide_hwif_t *hwif = &ide_hwifs[index]; 199 ide_hwif_t *hwif = &ide_hwifs[index];
200 unsigned long io_addr = ide_default_io_base(index);
201 unsigned long ctl_addr = ide_default_io_ctl(io_addr);
200 202
201 ide_init_port_data(hwif, index); 203 ide_init_port_data(hwif, index);
202 204
205#ifdef CONFIG_IDE_ARCH_OBSOLETE_INIT
203 memset(&hw, 0, sizeof(hw)); 206 memset(&hw, 0, sizeof(hw));
204 ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, 207 ide_std_init_ports(&hw, io_addr, ctl_addr);
205 &hwif->irq); 208# ifdef CONFIG_PPC32
209 if (ppc_ide_md.ide_init_hwif)
210 ppc_ide_md.ide_init_hwif(&hw, io_addr, 0, &hwif->irq);
211# endif
206 memcpy(hwif->io_ports, hw.io_ports, sizeof(hw.io_ports)); 212 memcpy(hwif->io_ports, hw.io_ports, sizeof(hw.io_ports));
213#endif
207 hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; 214 hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
208#if !defined(CONFIG_PPC32) || !defined(CONFIG_PCI) 215#if !defined(CONFIG_PPC32) || !defined(CONFIG_PCI)
209 hwif->irq = 216 hwif->irq =
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 7744ac9d1ff9..f4c7db572a16 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -215,38 +215,6 @@ static inline void ide_std_init_ports(hw_regs_t *hw,
215# define ide_init_default_irq(base) (0) 215# define ide_init_default_irq(base) (0)
216#endif 216#endif
217 217
218#ifdef CONFIG_IDE_ARCH_OBSOLETE_INIT
219static inline void ide_init_hwif_ports(hw_regs_t *hw,
220 unsigned long io_addr,
221 unsigned long ctl_addr,
222 int *irq)
223{
224 if (!ctl_addr)
225 ide_std_init_ports(hw, io_addr, ide_default_io_ctl(io_addr));
226 else
227 ide_std_init_ports(hw, io_addr, ctl_addr);
228
229 if (irq)
230 *irq = 0;
231
232 hw->io_ports[IDE_IRQ_OFFSET] = 0;
233
234#ifdef CONFIG_PPC32
235 if (ppc_ide_md.ide_init_hwif)
236 ppc_ide_md.ide_init_hwif(hw, io_addr, ctl_addr, irq);
237#endif
238}
239#else
240static inline void ide_init_hwif_ports(hw_regs_t *hw,
241 unsigned long io_addr,
242 unsigned long ctl_addr,
243 int *irq)
244{
245 if (io_addr || ctl_addr)
246 printk(KERN_WARNING "%s: must not be called\n", __FUNCTION__);
247}
248#endif /* CONFIG_IDE_ARCH_OBSOLETE_INIT */
249
250/* Currently only m68k, apus and m8xx need it */ 218/* Currently only m68k, apus and m8xx need it */
251#ifndef IDE_ARCH_ACK_INTR 219#ifndef IDE_ARCH_ACK_INTR
252# define ide_ack_intr(hwif) (1) 220# define ide_ack_intr(hwif) (1)