Skip to content

Commit

Permalink
Staging: comedi: fix macro coding style issue in adl_pci9111.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maurice Dawson authored and Greg Kroah-Hartman committed Sep 14, 2010
1 parent ff75f96 commit 8be11ff
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,19 +266,28 @@ a multiple of chanlist_len*convert_arg.
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 */

Expand Down

0 comments on commit 8be11ff

Please sign in to comment.