From: H Hartley Sweeten Date: Fri, 22 Jun 2012 23:34:57 +0000 (-0700) Subject: staging: comedi: ni_daq_700: use a local var to fix a > 80 char line issue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c11a1ea71bf2ce9a75a7071c785220a42f4c922a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Ian Abbott Cc: Frank Mori Hess Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index 4978cd374a53..2ea3c8d5194c 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c @@ -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: