Fixed sign error that prevented commands from aborting properly on
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 12 Nov 2007 22:15:31 +0000 (22:15 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 12 Nov 2007 22:15:31 +0000 (22:15 +0000)
errors.

comedi/drivers/ni_mio_common.c

index e44488df34f7de1e8b81c94ab919e0a74f5ecbdc..f667bed1e93ee06372f77f7148f1368bb87a3520 100644 (file)
@@ -910,7 +910,7 @@ static void ni_event(comedi_device * dev, comedi_subdevice * s)
        if (s->async->
                events & (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW | COMEDI_CB_EOA))
        {
-               switch (dev->subdevices - s) {
+               switch (s - dev->subdevices) {
                case NI_AI_SUBDEV:
                        ni_ai_reset(dev, s);
                        break;