Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354429
b: refs/heads/master
c: 9f4d4de
h: refs/heads/master
i:
  354427: 2e4a1e4
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Feb 6, 2013
1 parent f4b538c commit 9d5d072
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70ba1a599333c576e9dea7dfdcd9a4446d958093
refs/heads/master: 9f4d4de3080116173256ce86a32b4c4d472ab1e9
21 changes: 6 additions & 15 deletions trunk/drivers/staging/comedi/drivers/vmk80xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,6 @@ static const struct vmk80xx_board vmk80xx_boardinfo[] = {
},
};

enum {
VMK80XX_SUBD_AI,
VMK80XX_SUBD_AO,
VMK80XX_SUBD_DI,
VMK80XX_SUBD_DO,
VMK80XX_SUBD_CNT,
VMK80XX_SUBD_PWM,
};

struct vmk80xx_usb {
struct usb_device *udev;
struct usb_interface *intf;
Expand Down Expand Up @@ -1159,7 +1150,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
}

/* Analog input subdevice */
s = &cdev->subdevices[VMK80XX_SUBD_AI];
s = &cdev->subdevices[0];
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND;
s->n_chan = boardinfo->ai_chans;
Expand All @@ -1168,7 +1159,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
s->insn_read = vmk80xx_ai_rinsn;

/* Analog output subdevice */
s = &cdev->subdevices[VMK80XX_SUBD_AO];
s = &cdev->subdevices[1];
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND;
s->n_chan = boardinfo->ao_chans;
Expand All @@ -1181,7 +1172,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
}

/* Digital input subdevice */
s = &cdev->subdevices[VMK80XX_SUBD_DI];
s = &cdev->subdevices[2];
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE | SDF_GROUND;
s->n_chan = boardinfo->di_chans;
Expand All @@ -1190,7 +1181,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
s->insn_bits = vmk80xx_di_bits;

/* Digital output subdevice */
s = &cdev->subdevices[VMK80XX_SUBD_DO];
s = &cdev->subdevices[3];
s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND;
s->n_chan = 8;
Expand All @@ -1203,7 +1194,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,
}

/* Counter subdevice */
s = &cdev->subdevices[VMK80XX_SUBD_CNT];
s = &cdev->subdevices[4];
s->type = COMEDI_SUBD_COUNTER;
s->subdev_flags = SDF_READABLE;
s->n_chan = 2;
Expand All @@ -1217,7 +1208,7 @@ static int vmk80xx_attach_common(struct comedi_device *cdev,

/* PWM subdevice */
if (boardinfo->model == VMK8061_MODEL) {
s = &cdev->subdevices[VMK80XX_SUBD_PWM];
s = &cdev->subdevices[5];
s->type = COMEDI_SUBD_PWM;
s->subdev_flags = SDF_READABLE | SDF_WRITEABLE;
s->n_chan = boardinfo->pwm_chans;
Expand Down

0 comments on commit 9d5d072

Please sign in to comment.