]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Atari Falcon IDE: clean up ide_intr_lock handling
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 29 Dec 2002 03:09:48 +0000 (19:09 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 29 Dec 2002 03:09:48 +0000 (19:09 -0800)
Here's a fix on top of the patch you commited:

  - Rename ide_intr_lock to falconide_intr_lock
  - Add falconide_intr_lock to the Falcon IDE driver itself
  - Test for CONFIG_BLK_DEV_FALCON_IDE instead of CONFIG_ATARI since
    falconide_intr_lock is Falcon IDE-specific, not Atari-specific

drivers/ide/legacy/falconide.c
include/asm-m68k/ide.h

index 407276e6aab3ce622a52a773a92fb51d479e2262..b0babb4acc08cb90474da6014c20582dd9377bf7 100644 (file)
@@ -48,6 +48,14 @@ static int falconide_offsets[IDE_NR_PORTS] __initdata = {
 };
 
 
+    /*
+     *  falconide_intr_lock is used to obtain access to the IDE interrupt,
+     *  which is shared between several drivers.
+     */
+
+int falconide_intr_lock;
+
+
     /*
      *  Probe for a Falcon IDE interface
      */
index 6b451e47441c71b663abf18b8f33ec7d156a1c2f..621be3adc24aba840fc9e99d56aa41757992c806 100644 (file)
@@ -144,19 +144,19 @@ static __inline__ void ide_init_default_hwifs(void)
 
 #define ATA_ARCH_ACK_INTR
 
-#ifdef CONFIG_ATARI
+#ifdef CONFIG_BLK_DEV_FALCON_IDE
 #define ATA_ARCH_LOCK
 
-extern int ide_intr_lock;
+extern int falconide_intr_lock;
 
 static __inline__ void ide_release_lock (void)
 {
        if (MACH_IS_ATARI) {
-               if (ide_intr_lock == 0) {
+               if (falconide_intr_lock == 0) {
                        printk("ide_release_lock: bug\n");
                        return;
                }
-               ide_intr_lock = 0;
+               falconide_intr_lock = 0;
                stdma_release();
        }
 }
@@ -164,14 +164,14 @@ static __inline__ void ide_release_lock (void)
 static __inline__ void ide_get_lock(void (*handler)(int, void *, struct pt_regs *), void *data)
 {
        if (MACH_IS_ATARI) {
-               if (ide_intr_lock == 0) {
+               if (falconide_intr_lock == 0) {
                        if (in_interrupt() > 0)
                                panic( "Falcon IDE hasn't ST-DMA lock in interrupt" );
                        stdma_lock(handler, data);
-                       ide_intr_lock = 1;
+                       falconide_intr_lock = 1;
                }
        }
 }
-#endif /* CONFIG_ATARI */
+#endif /* CONFIG_BLK_DEV_FALCON_IDE */
 #endif /* __KERNEL__ */
 #endif /* _M68K_IDE_H */