Commit 3ccdcf32 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: c6xdigio: tidy up subdevice 1 init



Remove the commented out init of the 'trig'.

For aesthetics, add some whitespace to the init and rename the 'insn_read'
function.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c8df38a
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -187,9 +187,10 @@ static int c6xdigio_pwm_insn_write(struct comedi_device *dev,
	return i;
}

static int c6xdigio_ei_insn_read(struct comedi_device *dev,
static int c6xdigio_encoder_insn_read(struct comedi_device *dev,
				      struct comedi_subdevice *s,
				 struct comedi_insn *insn, unsigned int *data)
				      struct comedi_insn *insn,
				      unsigned int *data)
{
	unsigned int chan = CR_CHAN(insn->chanspec);
	int n;
@@ -250,10 +251,9 @@ static int c6xdigio_attach(struct comedi_device *dev,
	s->type		= COMEDI_SUBD_COUNTER;
	s->subdev_flags	= SDF_READABLE | SDF_LSAMPL;
	s->n_chan	= 2;
	/* s->trig[0] = c6xdigio_ei; */
	s->insn_read = c6xdigio_ei_insn_read;
	s->maxdata	= 0xffffff;
	s->range_table	= &range_unknown;
	s->insn_read	= c6xdigio_encoder_insn_read;

	/*  I will call this init anyway but more than likely the DSP board */
	/*  will not be connected when device driver is loaded. */