From 0edc7d8381b1d9f9c15d1590b057e9160032603b Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 24 Aug 2012 17:26:26 +0100 Subject: [PATCH] staging: comedi: serial2002: Set range for digital inputs and outputs I got an update from the original author of this driver (Anders Blomdell) to set the range table for digital input and digital output subdevices. Apply it. Cc: Anders Blomdell Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/serial2002.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index c18314b..0b58eec 100644 --- a/drivers/staging/comedi/drivers/serial2002.c +++ b/drivers/staging/comedi/drivers/serial2002.c @@ -588,7 +588,9 @@ static int serial_2002_open(struct comedi_device *dev) kfree(s->range_table_list); s->range_table = NULL; s->range_table_list = NULL; - if (range) { + if (kind == 1 || kind == 2) { + s->range_table = &range_digital; + } else if (range) { s->range_table_list = range_table_list = kmalloc(sizeof (struct -- 2.7.4