aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-08 13:27:22 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-08 13:27:22 -0400
commita861beb1401d65e3f095fee074c13645ab06490e (patch)
treea464f863ddd8421bdfe6a05fdfcb56da33c0b9e7 /drivers
parent86df86424939d316b1f6cfac1b6204f0c7dee317 (diff)
ide: add __ide_default_irq() inline helper
Add __ide_default_irq() inline helper and use it instead of ide_default_irq() in ide-probe.c and ns87415.c (all host drivers except IDE PCI ones always setup hwif->irq so it is enough to check only for I/O bases 0x1f0 and 0x170). This fixes post-2.6.25 regression since ide_default_irq() define could shadow ide_default_irq() inline. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-probe.c8
-rw-r--r--drivers/ide/pci/ns87415.c6
2 files changed, 3 insertions, 11 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index d27061b3932..26e68b65b7c 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1218,16 +1218,12 @@ static void drive_release_dev (struct device *dev)
1218 complete(&drive->gendev_rel_comp); 1218 complete(&drive->gendev_rel_comp);
1219} 1219}
1220 1220
1221#ifndef ide_default_irq
1222#define ide_default_irq(irq) 0
1223#endif
1224
1225static int hwif_init(ide_hwif_t *hwif) 1221static int hwif_init(ide_hwif_t *hwif)
1226{ 1222{
1227 int old_irq; 1223 int old_irq;
1228 1224
1229 if (!hwif->irq) { 1225 if (!hwif->irq) {
1230 hwif->irq = ide_default_irq(hwif->io_ports.data_addr); 1226 hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
1231 if (!hwif->irq) { 1227 if (!hwif->irq) {
1232 printk("%s: DISABLED, NO IRQ\n", hwif->name); 1228 printk("%s: DISABLED, NO IRQ\n", hwif->name);
1233 return 0; 1229 return 0;
@@ -1257,7 +1253,7 @@ static int hwif_init(ide_hwif_t *hwif)
1257 * It failed to initialise. Find the default IRQ for 1253 * It failed to initialise. Find the default IRQ for
1258 * this port and try that. 1254 * this port and try that.
1259 */ 1255 */
1260 hwif->irq = ide_default_irq(hwif->io_ports.data_addr); 1256 hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
1261 if (!hwif->irq) { 1257 if (!hwif->irq) {
1262 printk("%s: Disabled unable to get IRQ %d.\n", 1258 printk("%s: Disabled unable to get IRQ %d.\n",
1263 hwif->name, old_irq); 1259 hwif->name, old_irq);
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c
index fec4955f449..a7a41bb8277 100644
--- a/drivers/ide/pci/ns87415.c
+++ b/drivers/ide/pci/ns87415.c
@@ -225,10 +225,6 @@ static int ns87415_dma_setup(ide_drive_t *drive)
225 return 1; 225 return 1;
226} 226}
227 227
228#ifndef ide_default_irq
229#define ide_default_irq(irq) 0
230#endif
231
232static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) 228static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
233{ 229{
234 struct pci_dev *dev = to_pci_dev(hwif->dev); 230 struct pci_dev *dev = to_pci_dev(hwif->dev);
@@ -288,7 +284,7 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
288 } 284 }
289 285
290 if (!using_inta) 286 if (!using_inta)
291 hwif->irq = ide_default_irq(hwif->io_ports.data_addr); 287 hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
292 else if (!hwif->irq && hwif->mate && hwif->mate->irq) 288 else if (!hwif->irq && hwif->mate && hwif->mate->irq)
293 hwif->irq = hwif->mate->irq; /* share IRQ with mate */ 289 hwif->irq = hwif->mate->irq; /* share IRQ with mate */
294 290