Commit c11a1ea7 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: ni_daq_700: use a local var to fix a > 80 char line issue

The 'data[1] = ...' line is currently kept < 80 chars by breaking a pointer
access after the '->'. This makes the code a bit confusing to follow. Use
a local variable to shorten the line and make it clearer.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4fb209a5
...@@ -80,6 +80,7 @@ static int subdev_700_insn_config(struct comedi_device *dev, ...@@ -80,6 +80,7 @@ static int subdev_700_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
unsigned int chan = 1 << CR_CHAN(insn->chanspec);
switch (data[0]) { switch (data[0]) {
case INSN_CONFIG_DIO_INPUT: case INSN_CONFIG_DIO_INPUT:
...@@ -87,10 +88,7 @@ static int subdev_700_insn_config(struct comedi_device *dev, ...@@ -87,10 +88,7 @@ static int subdev_700_insn_config(struct comedi_device *dev,
case INSN_CONFIG_DIO_OUTPUT: case INSN_CONFIG_DIO_OUTPUT:
break; break;
case INSN_CONFIG_DIO_QUERY: case INSN_CONFIG_DIO_QUERY:
data[1] = data[1] = (s->io_bits & chan) ? COMEDI_OUTPUT : COMEDI_INPUT;
(s->
io_bits & (1 << CR_CHAN(insn->chanspec))) ? COMEDI_OUTPUT :
COMEDI_INPUT;
return insn->n; return insn->n;
break; break;
default: default:
......
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