aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:52 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:52 -0400
commit8b07ed26f8eb73d4f55a9d852712cd588c45ff51 (patch)
tree07e275f79fa402937b9369c1bad3c1daf0a6a041 /drivers/ide
parentbd0c08470fcded75d3904734ee22ae5b363737db (diff)
ide: remove no longer needed IRQ fallback code from hwif_init()
Then remove no longer used __ide_default_irq(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-probe.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 80967307f2bb..ebc328c2e7ee 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1070,14 +1070,9 @@ static void drive_release_dev (struct device *dev)
1070 1070
1071static int hwif_init(ide_hwif_t *hwif) 1071static int hwif_init(ide_hwif_t *hwif)
1072{ 1072{
1073 int old_irq;
1074
1075 if (!hwif->irq) { 1073 if (!hwif->irq) {
1076 hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); 1074 printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name);
1077 if (!hwif->irq) { 1075 return 0;
1078 printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name);
1079 return 0;
1080 }
1081 } 1076 }
1082 1077
1083 if (register_blkdev(hwif->major, hwif->name)) 1078 if (register_blkdev(hwif->major, hwif->name))
@@ -1095,29 +1090,12 @@ static int hwif_init(ide_hwif_t *hwif)
1095 1090
1096 sg_init_table(hwif->sg_table, hwif->sg_max_nents); 1091 sg_init_table(hwif->sg_table, hwif->sg_max_nents);
1097 1092
1098 if (init_irq(hwif) == 0)
1099 goto done;
1100
1101 old_irq = hwif->irq;
1102 /*
1103 * It failed to initialise. Find the default IRQ for
1104 * this port and try that.
1105 */
1106 hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
1107 if (!hwif->irq) {
1108 printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n",
1109 hwif->name, old_irq);
1110 goto out;
1111 }
1112 if (init_irq(hwif)) { 1093 if (init_irq(hwif)) {
1113 printk(KERN_ERR "%s: probed IRQ %d and default IRQ %d failed\n", 1094 printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n",
1114 hwif->name, old_irq, hwif->irq); 1095 hwif->name, hwif->irq);
1115 goto out; 1096 goto out;
1116 } 1097 }
1117 printk(KERN_WARNING "%s: probed IRQ %d failed, using default\n",
1118 hwif->name, hwif->irq);
1119 1098
1120done:
1121 blk_register_region(MKDEV(hwif->major, 0), MAX_DRIVES << PARTN_BITS, 1099 blk_register_region(MKDEV(hwif->major, 0), MAX_DRIVES << PARTN_BITS,
1122 THIS_MODULE, ata_probe, ata_lock, hwif); 1100 THIS_MODULE, ata_probe, ata_lock, hwif);
1123 return 1; 1101 return 1;