Commit 7ecac4c3 authored by Mark's avatar Mark Committed by Greg Kroah-Hartman

Staging: comedi: Cleanup style issues in adl_pci9111.c

This patch fixes some coding style issues in adl_pci9111.c from checkpatch.pl
Signed-off-by: default avatarMark Rankilor <reodge@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 529e5b32
...@@ -248,11 +248,13 @@ Configuration options: ...@@ -248,11 +248,13 @@ Configuration options:
^ PCI9111_AI_RESOLUTION_2_CMP_BIT) ^ PCI9111_AI_RESOLUTION_2_CMP_BIT)
#define pci9111_hr_ai_get_data() \ #define pci9111_hr_ai_get_data() \
(inw(PCI9111_IO_BASE+PCI9111_REGISTER_AD_FIFO_VALUE) & PCI9111_HR_AI_RESOLUTION_MASK) \ ((inw(PCI9111_IO_BASE+PCI9111_REGISTER_AD_FIFO_VALUE) \
^ PCI9111_HR_AI_RESOLUTION_2_CMP_BIT & PCI9111_HR_AI_RESOLUTION_MASK) \
^ PCI9111_HR_AI_RESOLUTION_2_CMP_BIT)
#define pci9111_ao_set_data(data) \ #define pci9111_ao_set_data(data) \
outw(data&PCI9111_AO_RESOLUTION_MASK, PCI9111_IO_BASE+PCI9111_REGISTER_DA_OUTPUT) outw(data&PCI9111_AO_RESOLUTION_MASK, \
PCI9111_IO_BASE+PCI9111_REGISTER_DA_OUTPUT)
#define pci9111_di_get_bits() \ #define pci9111_di_get_bits() \
inw(PCI9111_IO_BASE+PCI9111_REGISTER_DIGITAL_IO) inw(PCI9111_IO_BASE+PCI9111_REGISTER_DIGITAL_IO)
...@@ -297,12 +299,11 @@ static const struct comedi_lrange pci9111_hr_ai_range = { ...@@ -297,12 +299,11 @@ static const struct comedi_lrange pci9111_hr_ai_range = {
}; };
static DEFINE_PCI_DEVICE_TABLE(pci9111_pci_table) = { static DEFINE_PCI_DEVICE_TABLE(pci9111_pci_table) = {
{ { PCI_VENDOR_ID_ADLINK, PCI9111_HR_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,
PCI_VENDOR_ID_ADLINK, PCI9111_HR_DEVICE_ID, PCI_ANY_ID, 0, 0, 0 },
PCI_ANY_ID, 0, 0, 0}, /* { PCI_VENDOR_ID_ADLINK, PCI9111_HG_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,
/* { PCI_VENDOR_ID_ADLINK, PCI9111_HG_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, */ * 0, 0, 0 }, */
{ { 0 }
0}
}; };
MODULE_DEVICE_TABLE(pci, pci9111_pci_table); MODULE_DEVICE_TABLE(pci, pci9111_pci_table);
...@@ -394,7 +395,8 @@ struct pci9111_private_data { ...@@ -394,7 +395,8 @@ struct pci9111_private_data {
struct pci_dev *pci_device; struct pci_dev *pci_device;
unsigned long io_range; /* PCI6503 io range */ unsigned long io_range; /* PCI6503 io range */
unsigned long lcr_io_base; /* Local configuration register base address */ unsigned long lcr_io_base; /* Local configuration register base
* address */
unsigned long lcr_io_range; unsigned long lcr_io_range;
int stop_counter; int stop_counter;
...@@ -407,7 +409,8 @@ struct pci9111_private_data { ...@@ -407,7 +409,8 @@ struct pci9111_private_data {
int ao_readback; /* Last written analog output data */ int ao_readback; /* Last written analog output data */
unsigned int timer_divisor_1; /* Divisor values for the 8254 timer pacer */ unsigned int timer_divisor_1; /* Divisor values for the 8254 timer
* pacer */
unsigned int timer_divisor_2; unsigned int timer_divisor_2;
int is_valid; /* Is device valid */ int is_valid; /* Is device valid */
...@@ -597,10 +600,12 @@ static int pci9111_ai_cancel(struct comedi_device *dev, ...@@ -597,10 +600,12 @@ static int pci9111_ai_cancel(struct comedi_device *dev,
/* Test analog input command */ /* Test analog input command */
#define pci9111_check_trigger_src(src, flags) \ #define pci9111_check_trigger_src(src, flags) do { \
tmp = src; \ tmp = src; \
src &= flags; \ src &= flags; \
if (!src || tmp != src) error++ if (!src || tmp != src) \
error++; \
} while (false);
static int static int
pci9111_ai_do_cmd_test(struct comedi_device *dev, pci9111_ai_do_cmd_test(struct comedi_device *dev,
...@@ -624,7 +629,8 @@ pci9111_ai_do_cmd_test(struct comedi_device *dev, ...@@ -624,7 +629,8 @@ pci9111_ai_do_cmd_test(struct comedi_device *dev,
if (error) if (error)
return 1; return 1;
/* step 2 : make sure trigger sources are unique and mutually compatible */ /* step 2 : make sure trigger sources are unique and mutually
* compatible */
if (cmd->start_src != TRIG_NOW) if (cmd->start_src != TRIG_NOW)
error++; error++;
...@@ -686,7 +692,8 @@ pci9111_ai_do_cmd_test(struct comedi_device *dev, ...@@ -686,7 +692,8 @@ pci9111_ai_do_cmd_test(struct comedi_device *dev,
cmd->scan_begin_arg = board->ai_acquisition_period_min_ns; cmd->scan_begin_arg = board->ai_acquisition_period_min_ns;
error++; error++;
} }
if ((cmd->scan_begin_src == TRIG_FOLLOW) && (cmd->scan_begin_arg != 0)) { if ((cmd->scan_begin_src == TRIG_FOLLOW)
&& (cmd->scan_begin_arg != 0)) {
cmd->scan_begin_arg = 0; cmd->scan_begin_arg = 0;
error++; error++;
} }
...@@ -1277,10 +1284,12 @@ static int pci9111_attach(struct comedi_device *dev, ...@@ -1277,10 +1284,12 @@ static int pci9111_attach(struct comedi_device *dev,
for (i = 0; i < pci9111_board_nbr; i++) { for (i = 0; i < pci9111_board_nbr; i++) {
if (pci9111_boards[i].device_id == if (pci9111_boards[i].device_id ==
pci_device->device) { pci_device->device) {
/* was a particular bus/slot requested? */ /* was a particular bus/slot
* requested? */
if ((it->options[0] != 0) if ((it->options[0] != 0)
|| (it->options[1] != 0)) { || (it->options[1] != 0)) {
/* are we on the wrong bus/slot? */ /* are we on the wrong
* bus/slot? */
if (pci_device->bus->number != if (pci_device->bus->number !=
it->options[0] it->options[0]
|| ||
...@@ -1316,7 +1325,8 @@ static int pci9111_attach(struct comedi_device *dev, ...@@ -1316,7 +1325,8 @@ static int pci9111_attach(struct comedi_device *dev,
/* TODO: Warn about non-tested boards. */ /* TODO: Warn about non-tested boards. */
/* Read local configuration register base address [PCI_BASE_ADDRESS #1]. */ /* Read local configuration register base address
* [PCI_BASE_ADDRESS #1]. */
lcr_io_base = pci_resource_start(pci_device, 1); lcr_io_base = pci_resource_start(pci_device, 1);
lcr_io_range = pci_resource_len(pci_device, 1); lcr_io_range = pci_resource_len(pci_device, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment