/* select a register bank, 0 to 3 */
-#define SMC_SELECT_BANK(x) { outw( x, ioaddr + BANK_SELECT ); }
+#define SMC_SELECT_BANK(x) outw( x, ioaddr + BANK_SELECT )
/* define a small delay for the reset */
-#define SMC_DELAY() { inw( ioaddr + RCR );\
- inw( ioaddr + RCR );\
- inw( ioaddr + RCR ); }
+#define SMC_DELAY() do { inw( ioaddr + RCR );\
+ inw( ioaddr + RCR );\
+ inw( ioaddr + RCR );\
+} while(0)
/* this enables an interrupt in the interrupt mask register */
-#define SMC_ENABLE_INT(x) {\
+#define SMC_ENABLE_INT(x) do {\
unsigned char mask;\
SMC_SELECT_BANK(2);\
mask = inb( ioaddr + INT_MASK );\
mask |= (x);\
- outb( mask, ioaddr + INT_MASK ); \
-}
+ outb( mask, ioaddr + INT_MASK );\
+} while(0)
/* this disables an interrupt from the interrupt mask register */
-#define SMC_DISABLE_INT(x) {\
+#define SMC_DISABLE_INT(x) do {\
unsigned char mask;\
SMC_SELECT_BANK(2);\
mask = inb( ioaddr + INT_MASK );\
mask &= ~(x);\
- outb( mask, ioaddr + INT_MASK ); \
-}
+ outb( mask, ioaddr + INT_MASK );\
+} while(0)
/*----------------------------------------------------------------------
. Define the interrupts that I want to receive from the card
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/