[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201206221634.58135.hartleys@visionengravers.com>
Date: Fri, 22 Jun 2012 16:34:57 -0700
From: H Hartley Sweeten <hartleys@...ionengravers.com>
To: Linux Kernel <linux-kernel@...r.kernel.org>
CC: <devel@...verdev.osuosl.org>, <abbotti@....co.uk>,
<fmhess@...rs.sourceforge.net>, <gregkh@...uxfoundation.org>
Subject: [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 <hsweeten@...ionengravers.com>
Cc: Ian Abbott <abbotti@....co.uk>
Cc: Frank Mori Hess <fmhess@...rs.sourceforge.net>
Cc: Greg Kroah-hartman <gregkh@...uxfoundation.org>
---
drivers/staging/comedi/drivers/ni_daq_700.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
index 4978cd3..2ea3c8d 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:
--
1.7.11
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists