diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:21 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:21 -0400 |
commit | d15a613ba01ff2b209ecad7a38ccbb23b3b06c92 (patch) | |
tree | 3c13ef45f1eae35a2079f04350266f61bfbfa6c8 | |
parent | 088b1b88609ce89b6ab19d114cdbec94a44aa22c (diff) |
ide: remove IDE_ARCH_INTR (v2)
This micro-optimization is not worth it. Just always check for
existence of ->ack_intr method in ide_intr() and ide_timer_expiry().
v2:
Fix brown-paper-bag bug spotted by David D. Kilzer.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Cc: "David D. Kilzer" <ddkilzer@kilzer.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | arch/m68k/include/asm/ide.h | 3 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 5 | ||||
-rw-r--r-- | include/linux/ide.h | 5 |
3 files changed, 3 insertions, 10 deletions
diff --git a/arch/m68k/include/asm/ide.h b/arch/m68k/include/asm/ide.h index b996a3c8cff5..9f95f06eebe2 100644 --- a/arch/m68k/include/asm/ide.h +++ b/arch/m68k/include/asm/ide.h | |||
@@ -123,8 +123,5 @@ ide_get_lock(irq_handler_t handler, void *data) | |||
123 | } | 123 | } |
124 | #endif /* CONFIG_BLK_DEV_FALCON_IDE */ | 124 | #endif /* CONFIG_BLK_DEV_FALCON_IDE */ |
125 | 125 | ||
126 | #define IDE_ARCH_ACK_INTR | ||
127 | #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1) | ||
128 | |||
129 | #endif /* __KERNEL__ */ | 126 | #endif /* __KERNEL__ */ |
130 | #endif /* _M68K_IDE_H */ | 127 | #endif /* _M68K_IDE_H */ |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 2e92497b58aa..e85060164203 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -739,7 +739,8 @@ void ide_timer_expiry (unsigned long data) | |||
739 | } else if (drive_is_ready(drive)) { | 739 | } else if (drive_is_ready(drive)) { |
740 | if (drive->waiting_for_dma) | 740 | if (drive->waiting_for_dma) |
741 | hwif->dma_ops->dma_lost_irq(drive); | 741 | hwif->dma_ops->dma_lost_irq(drive); |
742 | (void)ide_ack_intr(hwif); | 742 | if (hwif->ack_intr) |
743 | hwif->ack_intr(hwif); | ||
743 | printk(KERN_WARNING "%s: lost interrupt\n", | 744 | printk(KERN_WARNING "%s: lost interrupt\n", |
744 | drive->name); | 745 | drive->name); |
745 | startstop = handler(drive); | 746 | startstop = handler(drive); |
@@ -854,7 +855,7 @@ irqreturn_t ide_intr (int irq, void *dev_id) | |||
854 | 855 | ||
855 | spin_lock_irqsave(&hwif->lock, flags); | 856 | spin_lock_irqsave(&hwif->lock, flags); |
856 | 857 | ||
857 | if (!ide_ack_intr(hwif)) | 858 | if (hwif->ack_intr && hwif->ack_intr(hwif) == 0) |
858 | goto out; | 859 | goto out; |
859 | 860 | ||
860 | handler = hwif->handler; | 861 | handler = hwif->handler; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 9a386501b9c1..cda80b5779a4 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -202,11 +202,6 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
202 | 202 | ||
203 | #define MAX_HWIFS 10 | 203 | #define MAX_HWIFS 10 |
204 | 204 | ||
205 | /* Currently only m68k, apus and m8xx need it */ | ||
206 | #ifndef IDE_ARCH_ACK_INTR | ||
207 | # define ide_ack_intr(hwif) (1) | ||
208 | #endif | ||
209 | |||
210 | /* Currently only Atari needs it */ | 205 | /* Currently only Atari needs it */ |
211 | #ifndef IDE_ARCH_LOCK | 206 | #ifndef IDE_ARCH_LOCK |
212 | # define ide_release_lock() do {} while (0) | 207 | # define ide_release_lock() do {} while (0) |