aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/macide.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/macide.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/macide.c')
-rw-r--r--drivers/ide/macide.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ide/macide.c b/drivers/ide/macide.c
index 05cdab35a75c..505ec43e5606 100644
--- a/drivers/ide/macide.c
+++ b/drivers/ide/macide.c
@@ -53,7 +53,7 @@
53 53
54volatile unsigned char *ide_ifr = (unsigned char *) (IDE_BASE + IDE_IFR); 54volatile unsigned char *ide_ifr = (unsigned char *) (IDE_BASE + IDE_IFR);
55 55
56int macide_ack_intr(ide_hwif_t* hwif) 56int macide_test_irq(ide_hwif_t *hwif)
57{ 57{
58 if (*ide_ifr & 0x20) 58 if (*ide_ifr & 0x20)
59 return 1; 59 return 1;
@@ -66,7 +66,7 @@ static void macide_clear_irq(ide_drive_t *drive)
66} 66}
67 67
68static void __init macide_setup_ports(struct ide_hw *hw, unsigned long base, 68static void __init macide_setup_ports(struct ide_hw *hw, unsigned long base,
69 int irq, ide_ack_intr_t *ack_intr) 69 int irq)
70{ 70{
71 int i; 71 int i;
72 72
@@ -78,11 +78,11 @@ static void __init macide_setup_ports(struct ide_hw *hw, unsigned long base,
78 hw->io_ports.ctl_addr = base + IDE_CONTROL; 78 hw->io_ports.ctl_addr = base + IDE_CONTROL;
79 79
80 hw->irq = irq; 80 hw->irq = irq;
81 hw->ack_intr = ack_intr;
82} 81}
83 82
84static const struct ide_port_ops macide_port_ops = { 83static const struct ide_port_ops macide_port_ops = {
85 .clear_irq = macide_clear_irq, 84 .clear_irq = macide_clear_irq,
85 .test_irq = macide_test_irq,
86}; 86};
87 87
88static const struct ide_port_info macide_port_info = { 88static const struct ide_port_info macide_port_info = {
@@ -101,7 +101,6 @@ static const char *mac_ide_name[] =
101 101
102static int __init macide_init(void) 102static int __init macide_init(void)
103{ 103{
104 ide_ack_intr_t *ack_intr;
105 unsigned long base; 104 unsigned long base;
106 int irq; 105 int irq;
107 struct ide_hw hw, *hws[] = { &hw }; 106 struct ide_hw hw, *hws[] = { &hw };
@@ -113,17 +112,14 @@ static int __init macide_init(void)
113 switch (macintosh_config->ide_type) { 112 switch (macintosh_config->ide_type) {
114 case MAC_IDE_QUADRA: 113 case MAC_IDE_QUADRA:
115 base = IDE_BASE; 114 base = IDE_BASE;
116 ack_intr = macide_ack_intr;
117 irq = IRQ_NUBUS_F; 115 irq = IRQ_NUBUS_F;
118 break; 116 break;
119 case MAC_IDE_PB: 117 case MAC_IDE_PB:
120 base = IDE_BASE; 118 base = IDE_BASE;
121 ack_intr = macide_ack_intr;
122 irq = IRQ_NUBUS_C; 119 irq = IRQ_NUBUS_C;
123 break; 120 break;
124 case MAC_IDE_BABOON: 121 case MAC_IDE_BABOON:
125 base = BABOON_BASE; 122 base = BABOON_BASE;
126 ack_intr = NULL;
127 d.port_ops = NULL; 123 d.port_ops = NULL;
128 irq = IRQ_BABOON_1; 124 irq = IRQ_BABOON_1;
129 break; 125 break;
@@ -134,7 +130,7 @@ static int __init macide_init(void)
134 printk(KERN_INFO "ide: Macintosh %s IDE controller\n", 130 printk(KERN_INFO "ide: Macintosh %s IDE controller\n",
135 mac_ide_name[macintosh_config->ide_type - 1]); 131 mac_ide_name[macintosh_config->ide_type - 1]);
136 132
137 macide_setup_ports(&hw, base, irq, ack_intr); 133 macide_setup_ports(&hw, base, irq);
138 134
139 return ide_host_add(&d, hws, 1, NULL); 135 return ide_host_add(&d, hws, 1, NULL);
140} 136}