diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-06-15 12:52:58 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-06-15 12:52:58 -0400 |
commit | f4d3ffa52a402ec9e8699571cf3811763d284459 (patch) | |
tree | 792c78dbf602af3f35020b041255905a95b917f2 /drivers/ide/buddha.c | |
parent | eba8999cefb6b61704d8fa825b7694825a087765 (diff) |
ide: move ack_intr() method into 'struct ide_port_ops' (take 2)
Move the ack_intr() method into 'struct ide_port_ops', also renaming it to
test_irq() while at it...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/buddha.c')
-rw-r--r-- | drivers/ide/buddha.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/ide/buddha.c b/drivers/ide/buddha.c index 9cd7b115763d..ab4f169d0837 100644 --- a/drivers/ide/buddha.c +++ b/drivers/ide/buddha.c | |||
@@ -99,7 +99,7 @@ static const char *buddha_board_name[] = { "Buddha", "Catweasel", "X-Surf" }; | |||
99 | * Check and acknowledge the interrupt status | 99 | * Check and acknowledge the interrupt status |
100 | */ | 100 | */ |
101 | 101 | ||
102 | static int buddha_ack_intr(ide_hwif_t *hwif) | 102 | static int buddha_test_irq(ide_hwif_t *hwif) |
103 | { | 103 | { |
104 | unsigned char ch; | 104 | unsigned char ch; |
105 | 105 | ||
@@ -118,8 +118,7 @@ static void xsurf_clear_irq(ide_drive_t *drive) | |||
118 | } | 118 | } |
119 | 119 | ||
120 | static void __init buddha_setup_ports(struct ide_hw *hw, unsigned long base, | 120 | static void __init buddha_setup_ports(struct ide_hw *hw, unsigned long base, |
121 | unsigned long ctl, unsigned long irq_port, | 121 | unsigned long ctl, unsigned long irq_port) |
122 | ide_ack_intr_t *ack_intr) | ||
123 | { | 122 | { |
124 | int i; | 123 | int i; |
125 | 124 | ||
@@ -134,14 +133,19 @@ static void __init buddha_setup_ports(struct ide_hw *hw, unsigned long base, | |||
134 | hw->io_ports.irq_addr = irq_port; | 133 | hw->io_ports.irq_addr = irq_port; |
135 | 134 | ||
136 | hw->irq = IRQ_AMIGA_PORTS; | 135 | hw->irq = IRQ_AMIGA_PORTS; |
137 | hw->ack_intr = ack_intr; | ||
138 | } | 136 | } |
139 | 137 | ||
138 | static const struct ide_port_ops buddha_port_ops = { | ||
139 | .test_irq = buddha_test_irq, | ||
140 | }; | ||
141 | |||
140 | static const struct ide_port_ops xsurf_port_ops = { | 142 | static const struct ide_port_ops xsurf_port_ops = { |
141 | .clear_irq = xsurf_clear_irq, | 143 | .clear_irq = xsurf_clear_irq, |
144 | .test_irq = buddha_test_irq, | ||
142 | }; | 145 | }; |
143 | 146 | ||
144 | static const struct ide_port_info buddha_port_info = { | 147 | static const struct ide_port_info buddha_port_info = { |
148 | .port_ops = &buddha_port_ops, | ||
145 | .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA, | 149 | .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA, |
146 | .irq_flags = IRQF_SHARED, | 150 | .irq_flags = IRQF_SHARED, |
147 | .chipset = ide_generic, | 151 | .chipset = ide_generic, |
@@ -217,8 +221,7 @@ fail_base2: | |||
217 | irq_port = buddha_board + xsurf_irqports[i]; | 221 | irq_port = buddha_board + xsurf_irqports[i]; |
218 | } | 222 | } |
219 | 223 | ||
220 | buddha_setup_ports(&hw[i], base, ctl, irq_port, | 224 | buddha_setup_ports(&hw[i], base, ctl, irq_port); |
221 | buddha_ack_intr); | ||
222 | 225 | ||
223 | hws[i] = &hw[i]; | 226 | hws[i] = &hw[i]; |
224 | } | 227 | } |