Commit d2e01434 authored by Benjamin Adolphi's avatar Benjamin Adolphi Committed by Greg Kroah-Hartman

Staging: comedi: adq12b: Checkpatch cleanups

This fixes some checkpatch issues in the adq12b comedi driver.
Signed-off-by: default avatarBenjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0289bb5d
...@@ -42,23 +42,23 @@ If you do not specify any options, they will default to ...@@ -42,23 +42,23 @@ If you do not specify any options, they will default to
option 1: I/O base address. The following table is provided as a help option 1: I/O base address. The following table is provided as a help
of the hardware jumpers. of the hardware jumpers.
address jumper JADR address jumper JADR
0x300 1 (factory default) 0x300 1 (factory default)
0x320 2 0x320 2
0x340 3 0x340 3
0x360 4 0x360 4
0x380 5 0x380 5
0x3A0 6 0x3A0 6
option 2: unipolar/bipolar ADC selection: 0 -> bipolar, 1 -> unipolar option 2: unipolar/bipolar ADC selection: 0 -> bipolar, 1 -> unipolar
selection comedi_config option JUB selection comedi_config option JUB
bipolar 0 2-3 (factory default) bipolar 0 2-3 (factory default)
unipolar 1 1-2 unipolar 1 1-2
option 3: single-ended/differential AI selection: 0 -> SE, 1 -> differential option 3: single-ended/differential AI selection: 0 -> SE, 1 -> differential
selection comedi_config option JCHA JCHB selection comedi_config option JCHA JCHB
single-ended 0 1-2 1-2 (factory default) single-ended 0 1-2 1-2 (factory default)
differential 1 2-3 2-3 differential 1 2-3 2-3
...@@ -140,7 +140,7 @@ static const struct adq12b_board adq12b_boards[] = { ...@@ -140,7 +140,7 @@ static const struct adq12b_board adq12b_boards[] = {
.ai_bits = 12, .ai_bits = 12,
.di_chans = 8, .di_chans = 8,
.do_chans = 5 .do_chans = 5
}*/ }*/
}; };
#define thisboard ((const struct adq12b_board *)dev->board_ptr) #define thisboard ((const struct adq12b_board *)dev->board_ptr)
...@@ -164,14 +164,15 @@ struct adq12b_private { ...@@ -164,14 +164,15 @@ struct adq12b_private {
static int adq12b_attach(struct comedi_device *dev, static int adq12b_attach(struct comedi_device *dev,
struct comedi_devconfig *it); struct comedi_devconfig *it);
static int adq12b_detach(struct comedi_device *dev); static int adq12b_detach(struct comedi_device *dev);
static struct comedi_driver driver_adq12b = { static struct comedi_driver driver_adq12b = {
driver_name:"adq12b", .driver_name = "adq12b",
module:THIS_MODULE, .module = THIS_MODULE,
attach:adq12b_attach, .attach = adq12b_attach,
detach:adq12b_detach, .detach = adq12b_detach,
board_name:&adq12b_boards[0].name, .board_name = &adq12b_boards[0].name,
offset:sizeof(struct adq12b_board), .offset = sizeof(struct adq12b_board),
num_names:ARRAY_SIZE(adq12b_boards), .num_names = ARRAY_SIZE(adq12b_boards),
}; };
static int adq12b_ai_rinsn(struct comedi_device *dev, static int adq12b_ai_rinsn(struct comedi_device *dev,
...@@ -259,11 +260,10 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -259,11 +260,10 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->n_chan = thisboard->ai_se_chans; s->n_chan = thisboard->ai_se_chans;
} }
if (unipolar) { if (unipolar)
s->range_table = &range_adq12b_ai_unipolar; s->range_table = &range_adq12b_ai_unipolar;
} else { else
s->range_table = &range_adq12b_ai_bipolar; s->range_table = &range_adq12b_ai_bipolar;
}
s->maxdata = (1 << thisboard->ai_bits) - 1; s->maxdata = (1 << thisboard->ai_bits) - 1;
...@@ -344,11 +344,11 @@ static int adq12b_ai_rinsn(struct comedi_device *dev, ...@@ -344,11 +344,11 @@ static int adq12b_ai_rinsn(struct comedi_device *dev,
/* wait for end of convertion */ /* wait for end of convertion */
i = 0; i = 0;
do { do {
/* udelay(1); */ /* udelay(1); */
status = inb(dev->iobase + ADQ12B_STINR); status = inb(dev->iobase + ADQ12B_STINR);
status = status & ADQ12B_EOC; status = status & ADQ12B_EOC;
} while (status == 0 && ++i < TIMEOUT); } while (status == 0 && ++i < TIMEOUT);
/* } while (++i < 10); */ /* } while (++i < 10); */
/* read data */ /* read data */
hi = inb(dev->iobase + ADQ12B_ADHIG); hi = inb(dev->iobase + ADQ12B_ADHIG);
......
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