From: Ian Abbott Date: Fri, 24 Aug 2012 16:26:26 +0000 (+0100) Subject: staging: comedi: serial2002: Set range for digital inputs and outputs X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0edc7d8381b1d9f9c15d1590b057e9160032603b;p=openwrt%2Fstaging%2Fblogic.git 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 --- diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index c18314be8c82..0b58eec97f78 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