staging: comedi: ni_daq_700: use a local var to fix a > 80 char line issue
PATCH 25/31 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 H Hartley Sweeten <[email protected]>
Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
Cc Greg Kroah-hartman <[email protected]>
--- drivers/staging/comedi/drivers/ni_daq_700.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/comedi/drivers/ni_daq_700.c +2 -4
@@ -80,6 +80,7 @@ static int subdev_700_insn_config(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { + unsigned int chan = 1 << CR_CHAN(insn->chanspec);switch (data[0 ]) {case INSN_CONFIG_DIO_INPUT :
@@ -87,10 +88,7 @@ static int subdev_700_insn_config(struct comedi_device *dev,case INSN_CONFIG_DIO_OUTPUT :break ;case INSN_CONFIG_DIO_QUERY : - data[1 ] = - (s-> - io_bits & (1 <<CR_CHAN (insn->chanspec))) ?COMEDI_OUTPUT : -COMEDI_INPUT ; + data[1 ] = (s->io_bits & chan) ?COMEDI_OUTPUT :COMEDI_INPUT ;return insn->n;break ;default :
Signature · 1 line
1.7.11