]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: comedi: fix macro coding style issue in adl_pci9111.c
authorMaurice Dawson <mauricedawson2699@gmail.com>
Fri, 10 Sep 2010 19:20:42 +0000 (20:20 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 14 Sep 2010 23:49:46 +0000 (16:49 -0700)
This is a patch that fixes up, macros with multiple statements should be enclosed in a do - while loop, coding style issue in the adl_pci9111.c file found by the checkpatch.pl tool

Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/adl_pci9111.c

index 96c4f300205e5bb8a4764bcdae7f02c7ffb277bb..18103b68769c81aadf74d79166cb288242080505 100644 (file)
@@ -266,19 +266,28 @@ TODO:
        outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_8254_CONTROL)
 
 #define pci9111_8254_counter_0_set(data) \
-       outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0); \
+       do { \
+               outb(data & 0xFF, \
+                       PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0); \
                outb((data >> 8) & 0xFF, \
-                       PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0)
+                       PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0); \
+       } while (0)
 
 #define pci9111_8254_counter_1_set(data) \
-       outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1); \
+       do { \
+               outb(data & 0xFF, \
+                       PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1); \
                outb((data >> 8) & 0xFF, \
-                       PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1)
+                       PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1); \
+       } while (0)
 
 #define pci9111_8254_counter_2_set(data) \
-       outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2); \
+       do { \
+               outb(data & 0xFF, \
+                       PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2); \
                outb((data >> 8) & 0xFF, \
-                       PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2)
+                       PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2); \
+       } while (0)
 
 /*  Function prototypes */