Skip to content

Commit

Permalink
staging: comedi: ni_daq_700: use a local var to fix a > 80 char line …
Browse files Browse the repository at this point in the history
…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 <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jun 23, 2012
1 parent 4fb209a commit c11a1ea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/staging/comedi/drivers/ni_daq_700.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,15 @@ 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:
break;
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:
Expand Down

0 comments on commit c11a1ea

Please sign in to comment.