Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: comedi: make constants slightly more consistent

This makes INSN_CONFIG_DIO_{INPUT,OUTPUT,OPENDRAIN} simply be copies of the
already-existing constants COMEDI_INPUT, COMEDI_OUTPUT, and
COMEDI_OPENDRAIN.

This change also ensures that if a user happens to use, for example,
COMEDI_INPUT in place of where INSN_CONFIG_DIO_INPUT, the result will
always be the same and also acceptable and correct usage.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Spencer E. Olson and committed by
Greg Kroah-Hartman
cc7a6d6c 5c53440d

+19 -19
+19 -19
drivers/staging/comedi/comedi.h
··· 245 245 /* configuration instructions */ 246 246 247 247 /** 248 + * enum comedi_io_direction - COMEDI I/O directions 249 + * @COMEDI_INPUT: Input. 250 + * @COMEDI_OUTPUT: Output. 251 + * @COMEDI_OPENDRAIN: Open-drain (or open-collector) output. 252 + * 253 + * These are used by the %INSN_CONFIG_DIO_QUERY configuration instruction to 254 + * report a direction. They may also be used in other places where a direction 255 + * needs to be specified. 256 + */ 257 + enum comedi_io_direction { 258 + COMEDI_INPUT = 0, 259 + COMEDI_OUTPUT = 1, 260 + COMEDI_OPENDRAIN = 2 261 + }; 262 + 263 + /** 248 264 * enum configuration_ids - COMEDI configuration instruction codes 249 265 * @INSN_CONFIG_DIO_INPUT: Configure digital I/O as input. 250 266 * @INSN_CONFIG_DIO_OUTPUT: Configure digital I/O as output. ··· 312 296 * @INSN_CONFIG_PWM_GET_H_BRIDGE: Get PWM H bridge duty cycle and polarity. 313 297 */ 314 298 enum configuration_ids { 315 - INSN_CONFIG_DIO_INPUT = 0, 316 - INSN_CONFIG_DIO_OUTPUT = 1, 317 - INSN_CONFIG_DIO_OPENDRAIN = 2, 299 + INSN_CONFIG_DIO_INPUT = COMEDI_INPUT, 300 + INSN_CONFIG_DIO_OUTPUT = COMEDI_OUTPUT, 301 + INSN_CONFIG_DIO_OPENDRAIN = COMEDI_OPENDRAIN, 318 302 INSN_CONFIG_ANALOG_TRIG = 16, 319 303 /* INSN_CONFIG_WAVEFORM = 17, */ 320 304 /* INSN_CONFIG_TRIG = 18, */ ··· 410 394 COMEDI_DIGITAL_TRIG_DISABLE = 0, 411 395 COMEDI_DIGITAL_TRIG_ENABLE_EDGES = 1, 412 396 COMEDI_DIGITAL_TRIG_ENABLE_LEVELS = 2 413 - }; 414 - 415 - /** 416 - * enum comedi_io_direction - COMEDI I/O directions 417 - * @COMEDI_INPUT: Input. 418 - * @COMEDI_OUTPUT: Output. 419 - * @COMEDI_OPENDRAIN: Open-drain (or open-collector) output. 420 - * 421 - * These are used by the %INSN_CONFIG_DIO_QUERY configuration instruction to 422 - * report a direction. They may also be used in other places where a direction 423 - * needs to be specified. 424 - */ 425 - enum comedi_io_direction { 426 - COMEDI_INPUT = 0, 427 - COMEDI_OUTPUT = 1, 428 - COMEDI_OPENDRAIN = 2 429 397 }; 430 398 431 399 /**