From: H Hartley Sweeten Date: Mon, 9 Dec 2013 23:06:41 +0000 (-0700) Subject: staging: comedi: addi_apci_1032: fix subdevice type/flags bug X-Git-Tag: firefly_0821_release~3679^2~3053 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d687814867c12165eadb676a93af6a1e201ed494;p=firefly-linux-kernel-4.4.55.git staging: comedi: addi_apci_1032: fix subdevice type/flags bug commit 90daf69a7a3f1d1a41018c799968a0bb896d65e0 upstream. The SDF_CMD_READ should be one of the s->subdev_flags not part of the s->type. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c index 3d4878facc26..d919a9863e01 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1032.c +++ b/drivers/staging/comedi/drivers/addi_apci_1032.c @@ -332,8 +332,8 @@ static int apci1032_auto_attach(struct comedi_device *dev, s = &dev->subdevices[1]; if (dev->irq) { dev->read_subdev = s; - s->type = COMEDI_SUBD_DI | SDF_CMD_READ; - s->subdev_flags = SDF_READABLE; + s->type = COMEDI_SUBD_DI; + s->subdev_flags = SDF_READABLE | SDF_CMD_READ; s->n_chan = 1; s->maxdata = 1; s->range_table = &range_digital;