aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/gayle.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-06-15 12:52:58 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-06-15 12:52:58 -0400
commitf4d3ffa52a402ec9e8699571cf3811763d284459 (patch)
tree792c78dbf602af3f35020b041255905a95b917f2 /drivers/ide/gayle.c
parenteba8999cefb6b61704d8fa825b7694825a087765 (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/gayle.c')
-rw-r--r--drivers/ide/gayle.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/ide/gayle.c b/drivers/ide/gayle.c
index c5dd1e5cca4d..b9e517de6a82 100644
--- a/drivers/ide/gayle.c
+++ b/drivers/ide/gayle.c
@@ -66,7 +66,7 @@ MODULE_PARM_DESC(doubler, "enable support for IDE doublers");
66 * Check and acknowledge the interrupt status 66 * Check and acknowledge the interrupt status
67 */ 67 */
68 68
69static int gayle_ack_intr(ide_hwif_t *hwif) 69static int gayle_test_irq(ide_hwif_t *hwif)
70{ 70{
71 unsigned char ch; 71 unsigned char ch;
72 72
@@ -85,8 +85,7 @@ static void gayle_a1200_clear_irq(ide_drive_t *drive)
85} 85}
86 86
87static void __init gayle_setup_ports(struct ide_hw *hw, unsigned long base, 87static void __init gayle_setup_ports(struct ide_hw *hw, unsigned long base,
88 unsigned long ctl, unsigned long irq_port, 88 unsigned long ctl, unsigned long irq_port)
89 ide_ack_intr_t *ack_intr)
90{ 89{
91 int i; 90 int i;
92 91
@@ -101,11 +100,15 @@ static void __init gayle_setup_ports(struct ide_hw *hw, unsigned long base,
101 hw->io_ports.irq_addr = irq_port; 100 hw->io_ports.irq_addr = irq_port;
102 101
103 hw->irq = IRQ_AMIGA_PORTS; 102 hw->irq = IRQ_AMIGA_PORTS;
104 hw->ack_intr = ack_intr;
105} 103}
106 104
105static const struct ide_port_ops gayle_a4000_port_ops = {
106 .test_irq = gayle_test_irq,
107};
108
107static const struct ide_port_ops gayle_a1200_port_ops = { 109static const struct ide_port_ops gayle_a1200_port_ops = {
108 .clear_irq = gayle_a1200_clear_irq, 110 .clear_irq = gayle_a1200_clear_irq,
111 .test_irq = gayle_test_irq,
109}; 112};
110 113
111static const struct ide_port_info gayle_port_info = { 114static const struct ide_port_info gayle_port_info = {
@@ -148,6 +151,7 @@ found:
148 if (a4000) { 151 if (a4000) {
149 phys_base = GAYLE_BASE_4000; 152 phys_base = GAYLE_BASE_4000;
150 irqport = (unsigned long)ZTWO_VADDR(GAYLE_IRQ_4000); 153 irqport = (unsigned long)ZTWO_VADDR(GAYLE_IRQ_4000);
154 d.port_ops = &gayle_a4000_port_ops;
151 } else { 155 } else {
152 phys_base = GAYLE_BASE_1200; 156 phys_base = GAYLE_BASE_1200;
153 irqport = (unsigned long)ZTWO_VADDR(GAYLE_IRQ_1200); 157 irqport = (unsigned long)ZTWO_VADDR(GAYLE_IRQ_1200);
@@ -164,7 +168,7 @@ found:
164 base = (unsigned long)ZTWO_VADDR(phys_base + i * GAYLE_NEXT_PORT); 168 base = (unsigned long)ZTWO_VADDR(phys_base + i * GAYLE_NEXT_PORT);
165 ctrlport = GAYLE_HAS_CONTROL_REG ? (base + GAYLE_CONTROL) : 0; 169 ctrlport = GAYLE_HAS_CONTROL_REG ? (base + GAYLE_CONTROL) : 0;
166 170
167 gayle_setup_ports(&hw[i], base, ctrlport, irqport, gayle_ack_intr); 171 gayle_setup_ports(&hw[i], base, ctrlport, irqport);
168 172
169 hws[i] = &hw[i]; 173 hws[i] = &hw[i];
170 } 174 }