]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: remove IDE_ARCH_INTR (v2)
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:21 +0000 (12:46 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 27 Mar 2009 11:46:21 +0000 (12:46 +0100)
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>
arch/m68k/include/asm/ide.h
drivers/ide/ide-io.c
include/linux/ide.h

index b996a3c8cff54ae4a4857c1a5b955af6b6a391d4..9f95f06eebe2ede4b3a396f1caa28e22d8ae4822 100644 (file)
@@ -123,8 +123,5 @@ ide_get_lock(irq_handler_t handler, void *data)
 }
 #endif /* CONFIG_BLK_DEV_FALCON_IDE */
 
-#define IDE_ARCH_ACK_INTR
-#define ide_ack_intr(hwif)     ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
-
 #endif /* __KERNEL__ */
 #endif /* _M68K_IDE_H */
index 2e92497b58aa02501b208562ab498d4f4d6c1e87..e85060164203f9468e6d02c6bc8011ff298e821b 100644 (file)
@@ -739,7 +739,8 @@ void ide_timer_expiry (unsigned long data)
                } else if (drive_is_ready(drive)) {
                        if (drive->waiting_for_dma)
                                hwif->dma_ops->dma_lost_irq(drive);
-                       (void)ide_ack_intr(hwif);
+                       if (hwif->ack_intr)
+                               hwif->ack_intr(hwif);
                        printk(KERN_WARNING "%s: lost interrupt\n",
                                drive->name);
                        startstop = handler(drive);
@@ -854,7 +855,7 @@ irqreturn_t ide_intr (int irq, void *dev_id)
 
        spin_lock_irqsave(&hwif->lock, flags);
 
-       if (!ide_ack_intr(hwif))
+       if (hwif->ack_intr && hwif->ack_intr(hwif) == 0)
                goto out;
 
        handler = hwif->handler;
index 9a386501b9c1711cc5c71a25bc5c9a61de359555..cda80b5779a46ec5db8e1fd39b9eecf1e0e77bc2 100644 (file)
@@ -202,11 +202,6 @@ static inline void ide_std_init_ports(hw_regs_t *hw,
 
 #define MAX_HWIFS      10
 
-/* Currently only m68k, apus and m8xx need it */
-#ifndef IDE_ARCH_ACK_INTR
-# define ide_ack_intr(hwif) (1)
-#endif
-
 /* Currently only Atari needs it */
 #ifndef IDE_ARCH_LOCK
 # define ide_release_lock()                    do {} while (0)