From: H Hartley Sweeten Date: Fri, 8 Apr 2016 19:41:31 +0000 (-0700) Subject: staging: comedi: das1800: tidy up digital input subdevice init X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=92a3b54bd20eb15b5b7c6b70ba3423776ebcd2f0;p=linux-beck.git staging: comedi: das1800: tidy up digital input subdevice init For aesthetics, add some whitespace to the subdevice init and rename the (*insn_bits) function. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c index e7787ae3fb27..93a9d1f9a120 100644 --- a/drivers/staging/comedi/drivers/das1800.c +++ b/drivers/staging/comedi/drivers/das1800.c @@ -1130,10 +1130,10 @@ static int das1800_ao_winsn(struct comedi_device *dev, return 1; } -/* reads from digital input channels */ -static int das1800_di_rbits(struct comedi_device *dev, - struct comedi_subdevice *s, - struct comedi_insn *insn, unsigned int *data) +static int das1800_di_insn_bits(struct comedi_device *dev, + struct comedi_subdevice *s, + struct comedi_insn *insn, + unsigned int *data) { data[1] = inb(dev->iobase + DAS1800_DIGITAL) & 0xf; data[0] = 0; @@ -1387,14 +1387,14 @@ static int das1800_attach(struct comedi_device *dev, s->type = COMEDI_SUBD_UNUSED; } - /* di */ + /* Digital Input subdevice */ s = &dev->subdevices[2]; - s->type = COMEDI_SUBD_DI; - s->subdev_flags = SDF_READABLE; - s->n_chan = 4; - s->maxdata = 1; - s->range_table = &range_digital; - s->insn_bits = das1800_di_rbits; + s->type = COMEDI_SUBD_DI; + s->subdev_flags = SDF_READABLE; + s->n_chan = 4; + s->maxdata = 1; + s->range_table = &range_digital; + s->insn_bits = das1800_di_insn_bits; /* Digital Output subdevice */ s = &dev->subdevices[3];