serial2002: Set range for digital inputs and outputs...
authorAnders Blomdell <anders.blomdell@control.lth.se>
Fri, 24 Aug 2012 15:07:14 +0000 (16:07 +0100)
committerIan Abbott <abbotti@mev.co.uk>
Fri, 24 Aug 2012 15:31:11 +0000 (16:31 +0100)
comedi/drivers/serial2002.c

index c0335f47ac95c33c184993b5655520bff20a86ad..5b3ec386dfde0156b1280f0fb64abc1a1ece7f9a 100644 (file)
@@ -616,7 +616,9 @@ static int serial_2002_open(comedi_device * dev)
                                kfree(s->range_table_list);
                                s->range_table = 0;
                                s->range_table_list = 0;
-                               if (range) {
+                               if (kind == 1 || kind == 2) {
+                                       s->range_table = &range_digital;
+                               } else if (range) {
                                        s->range_table_list = range_table_list =
                                                kmalloc(sizeof
                                                (serial2002_range_table_t) *