staging: comedi: drivers: replace SDF_WRITEABLE with SDF_WRITABLE
As indicated in the comedi.h uapi header, SDF_WRITEABLE was a spelling error in the API, SDF_WRITABLE is prefered. For aesthetics, replace all the SDF_WRITEABLE uses with SDF_WRITABLE. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
75f6108fa9
commit
ef49d8329e
@@ -66,8 +66,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
|
||||
/* Allocate and Initialise DO Subdevice Structures */
|
||||
s = &dev->subdevices[1];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags =
|
||||
SDF_READABLE | SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->n_chan = 16;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
@@ -78,7 +77,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
|
||||
/* Allocate and Initialise Timer Subdevice Structures */
|
||||
s = &dev->subdevices[2];
|
||||
s->type = COMEDI_SUBD_TIMER;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->n_chan = 1;
|
||||
s->maxdata = 0;
|
||||
s->len_chanlist = 1;
|
||||
|
||||
@@ -163,7 +163,7 @@ static int apci1516_auto_attach(struct comedi_device *dev,
|
||||
s = &dev->subdevices[1];
|
||||
if (this_board->do_nchan) {
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = this_board->do_nchan;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
|
||||
@@ -403,7 +403,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
|
||||
/* Allocate and Initialise DO Subdevice Structures */
|
||||
s = &dev->subdevices[1];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 32;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
@@ -431,7 +431,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
|
||||
/* Allocate and Initialise Timer Subdevice Structures */
|
||||
s = &dev->subdevices[3];
|
||||
s->type = COMEDI_SUBD_TIMER;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 3;
|
||||
s->maxdata = 0;
|
||||
s->range_table = &range_digital;
|
||||
|
||||
@@ -140,7 +140,7 @@ static int apci16xx_auto_attach(struct comedi_device *dev,
|
||||
for (i = 0; i < n_subdevs; i++) {
|
||||
s = &dev->subdevices[i];
|
||||
s->type = COMEDI_SUBD_DIO;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_READABLE;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_READABLE;
|
||||
s->n_chan = ((i * 32) < board->n_chan) ? 32 : last;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
|
||||
@@ -267,7 +267,7 @@ static int apci2032_auto_attach(struct comedi_device *dev,
|
||||
/* Initialize the digital output subdevice */
|
||||
s = &dev->subdevices[0];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 32;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
|
||||
@@ -98,7 +98,7 @@ static int apci2200_auto_attach(struct comedi_device *dev,
|
||||
/* Initialize the digital output subdevice */
|
||||
s = &dev->subdevices[1];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 16;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
|
||||
@@ -192,7 +192,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
|
||||
s = &dev->subdevices[1];
|
||||
if (this_board->has_ao) {
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->n_chan = 8;
|
||||
s->maxdata = 0x3fff;
|
||||
s->range_table = &range_bipolar10;
|
||||
@@ -218,7 +218,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
|
||||
/* Digital Output subdevice */
|
||||
s = &dev->subdevices[3];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 4;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
@@ -227,7 +227,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
|
||||
/* Timer subdevice */
|
||||
s = &dev->subdevices[4];
|
||||
s->type = COMEDI_SUBD_TIMER;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_READABLE;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_READABLE;
|
||||
s->n_chan = 1;
|
||||
s->maxdata = 0x00ffffff;
|
||||
s->insn_write = apci3120_write_insn_timer;
|
||||
|
||||
@@ -357,7 +357,7 @@ static int apci3501_auto_attach(struct comedi_device *dev,
|
||||
s = &dev->subdevices[0];
|
||||
if (ao_n_chan) {
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->n_chan = ao_n_chan;
|
||||
s->maxdata = 0x3fff;
|
||||
s->range_table = &apci3501_ao_range;
|
||||
@@ -383,7 +383,7 @@ static int apci3501_auto_attach(struct comedi_device *dev,
|
||||
/* Initialize the digital output subdevice */
|
||||
s = &dev->subdevices[2];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 2;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
@@ -392,7 +392,7 @@ static int apci3501_auto_attach(struct comedi_device *dev,
|
||||
/* Initialize the timer/watchdog subdevice */
|
||||
s = &dev->subdevices[3];
|
||||
s->type = COMEDI_SUBD_TIMER;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->n_chan = 1;
|
||||
s->maxdata = 0;
|
||||
s->len_chanlist = 1;
|
||||
|
||||
@@ -849,7 +849,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev,
|
||||
if (board->has_ao) {
|
||||
s = &dev->subdevices[subdev];
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->n_chan = 4;
|
||||
s->maxdata = 0x0fff;
|
||||
s->range_table = &apci3xxx_ao_range;
|
||||
@@ -880,7 +880,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev,
|
||||
if (board->has_dig_out) {
|
||||
s = &dev->subdevices[subdev];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 4;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
@@ -893,7 +893,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev,
|
||||
if (board->has_ttl_io) {
|
||||
s = &dev->subdevices[subdev];
|
||||
s->type = COMEDI_SUBD_DIO;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
|
||||
s->n_chan = 24;
|
||||
s->maxdata = 1;
|
||||
s->io_bits = 0xff; /* channels 0-7 are always outputs */
|
||||
|
||||
@@ -134,7 +134,7 @@ int addi_watchdog_init(struct comedi_subdevice *s, unsigned long iobase)
|
||||
spriv->iobase = iobase;
|
||||
|
||||
s->type = COMEDI_SUBD_TIMER;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 1;
|
||||
s->maxdata = 0xff;
|
||||
s->insn_config = addi_watchdog_insn_config;
|
||||
|
||||
@@ -241,7 +241,7 @@ static int pci1723_auto_attach(struct comedi_device *dev,
|
||||
s = &dev->subdevices[0];
|
||||
dev->write_subdev = s;
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
|
||||
s->n_chan = 8;
|
||||
s->maxdata = 0xffff;
|
||||
s->len_chanlist = 8;
|
||||
|
||||
@@ -265,7 +265,7 @@ static int c6xdigio_attach(struct comedi_device *dev,
|
||||
s = &dev->subdevices[0];
|
||||
/* pwm output subdevice */
|
||||
s->type = COMEDI_SUBD_PWM;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 2;
|
||||
s->maxdata = 500;
|
||||
s->range_table = &range_unknown;
|
||||
|
||||
@@ -423,7 +423,7 @@ static int waveform_attach(struct comedi_device *dev,
|
||||
dev->write_subdev = s;
|
||||
/* analog output subdevice (loopback) */
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
|
||||
s->n_chan = N_CHANS;
|
||||
s->maxdata = 0xffff;
|
||||
s->range_table = &waveform_ai_ranges;
|
||||
|
||||
@@ -497,7 +497,7 @@ static int das6402_attach(struct comedi_device *dev,
|
||||
/* Analog Output subdevice */
|
||||
s = &dev->subdevices[1];
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 2;
|
||||
s->maxdata = board->maxdata;
|
||||
s->range_table = &das6402_ao_ranges;
|
||||
@@ -520,7 +520,7 @@ static int das6402_attach(struct comedi_device *dev,
|
||||
/* Digital Input subdevice */
|
||||
s = &dev->subdevices[3];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 8;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
|
||||
@@ -804,7 +804,7 @@ static int dt9812_auto_attach(struct comedi_device *dev,
|
||||
/* Digital Output subdevice */
|
||||
s = &dev->subdevices[1];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 8;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
@@ -822,7 +822,7 @@ static int dt9812_auto_attach(struct comedi_device *dev,
|
||||
/* Analog Output subdevice */
|
||||
s = &dev->subdevices[3];
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 2;
|
||||
s->maxdata = 0x0fff;
|
||||
s->range_table = is_unipolar ? &range_unipolar2_5 : &range_bipolar10;
|
||||
|
||||
@@ -689,7 +689,7 @@ static int gsc_hpdi_auto_attach(struct comedi_device *dev,
|
||||
s = &dev->subdevices[0];
|
||||
dev->read_subdev = s;
|
||||
s->type = COMEDI_SUBD_DIO;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE | SDF_LSAMPL |
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_LSAMPL |
|
||||
SDF_CMD_READ;
|
||||
s->n_chan = 32;
|
||||
s->len_chanlist = 32;
|
||||
|
||||
@@ -1421,7 +1421,7 @@ static int me4000_auto_attach(struct comedi_device *dev,
|
||||
|
||||
if (thisboard->ao_nchan) {
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_COMMON | SDF_GROUND;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_COMMON | SDF_GROUND;
|
||||
s->n_chan = thisboard->ao_nchan;
|
||||
s->maxdata = 0xFFFF; /* 16 bit DAC */
|
||||
s->range_table = &range_bipolar10;
|
||||
|
||||
@@ -511,7 +511,7 @@ static int me_auto_attach(struct comedi_device *dev,
|
||||
s = &dev->subdevices[1];
|
||||
if (board->has_ao) {
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_COMMON;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_COMMON;
|
||||
s->n_chan = 4;
|
||||
s->maxdata = 0x0fff;
|
||||
s->len_chanlist = 4;
|
||||
@@ -528,7 +528,7 @@ static int me_auto_attach(struct comedi_device *dev,
|
||||
|
||||
s = &dev->subdevices[2];
|
||||
s->type = COMEDI_SUBD_DIO;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
|
||||
s->n_chan = 32;
|
||||
s->maxdata = 1;
|
||||
s->len_chanlist = 32;
|
||||
|
||||
@@ -561,7 +561,7 @@ static int ni6501_auto_attach(struct comedi_device *dev,
|
||||
/* Counter subdevice */
|
||||
s = &dev->subdevices[1];
|
||||
s->type = COMEDI_SUBD_COUNTER;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE | SDF_LSAMPL;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_LSAMPL;
|
||||
s->n_chan = 1;
|
||||
s->maxdata = 0xffffffff;
|
||||
s->insn_read = ni6501_cnt_insn_read;
|
||||
|
||||
@@ -734,7 +734,7 @@ static int daqp_auto_attach(struct comedi_device *dev,
|
||||
|
||||
s = &dev->subdevices[1];
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 2;
|
||||
s->maxdata = 0x0fff;
|
||||
s->range_table = &range_bipolar5;
|
||||
@@ -754,7 +754,7 @@ static int daqp_auto_attach(struct comedi_device *dev,
|
||||
|
||||
s = &dev->subdevices[3];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 1;
|
||||
s->maxdata = 1;
|
||||
s->insn_bits = daqp_do_insn_bits;
|
||||
|
||||
@@ -742,7 +742,7 @@ static int serial2002_attach(struct comedi_device *dev,
|
||||
/* digital output subdevice */
|
||||
s = &dev->subdevices[1];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 0;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
@@ -760,7 +760,7 @@ static int serial2002_attach(struct comedi_device *dev,
|
||||
/* analog output subdevice */
|
||||
s = &dev->subdevices[3];
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 0;
|
||||
s->maxdata = 1;
|
||||
s->range_table = NULL;
|
||||
|
||||
@@ -797,7 +797,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
|
||||
/* Analog output subdevice */
|
||||
s = &dev->subdevices[1];
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_GROUND;
|
||||
s->n_chan = boardinfo->ao_nchans;
|
||||
s->maxdata = 0x00ff;
|
||||
s->range_table = boardinfo->range;
|
||||
@@ -819,7 +819,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
|
||||
/* Digital output subdevice */
|
||||
s = &dev->subdevices[3];
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_WRITABLE;
|
||||
s->n_chan = 8;
|
||||
s->maxdata = 1;
|
||||
s->range_table = &range_digital;
|
||||
@@ -834,7 +834,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
|
||||
s->insn_read = vmk80xx_cnt_insn_read;
|
||||
s->insn_config = vmk80xx_cnt_insn_config;
|
||||
if (devpriv->model == VMK8055_MODEL) {
|
||||
s->subdev_flags |= SDF_WRITEABLE;
|
||||
s->subdev_flags |= SDF_WRITABLE;
|
||||
s->insn_write = vmk80xx_cnt_insn_write;
|
||||
}
|
||||
|
||||
@@ -842,7 +842,7 @@ static int vmk80xx_init_subdevices(struct comedi_device *dev)
|
||||
if (devpriv->model == VMK8061_MODEL) {
|
||||
s = &dev->subdevices[5];
|
||||
s->type = COMEDI_SUBD_PWM;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE;
|
||||
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
|
||||
s->n_chan = boardinfo->pwm_nchans;
|
||||
s->maxdata = boardinfo->pwm_maxdata;
|
||||
s->insn_read = vmk80xx_pwm_insn_read;
|
||||
|
||||
Reference in New Issue
Block a user