mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
staging: comedi: fl512: remove subdevice pointer math
Convert the comedi_subdevice access from pointer math to array access. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1b39406b3e
commit
6fc01d32a2
1 changed files with 2 additions and 2 deletions
|
|
@ -140,7 +140,7 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
|||
* this if the definitions of the supdevices, 2 have been defined
|
||||
*/
|
||||
/* Analog indput */
|
||||
s = dev->subdevices + 0;
|
||||
s = &dev->subdevices[0];
|
||||
/* define subdevice as Analog In */
|
||||
s->type = COMEDI_SUBD_AI;
|
||||
/* you can read it from userspace */
|
||||
|
|
@ -156,7 +156,7 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
|||
printk(KERN_INFO "comedi: fl512: subdevice 0 initialized\n");
|
||||
|
||||
/* Analog output */
|
||||
s = dev->subdevices + 1;
|
||||
s = &dev->subdevices[1];
|
||||
/* define subdevice as Analog OUT */
|
||||
s->type = COMEDI_SUBD_AO;
|
||||
/* you can write it from userspace */
|
||||
|
|
|
|||
Loading…
Reference in a new issue