summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/comedi/drivers/pcmda12.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/comedi/drivers/pcmda12.c b/drivers/comedi/drivers/pcmda12.c
index 611f13bedca0..6efd1ae6271a 100644
--- a/drivers/comedi/drivers/pcmda12.c
+++ b/drivers/comedi/drivers/pcmda12.c
@@ -120,7 +120,14 @@ static int pcmda12_attach(struct comedi_device *dev,
struct comedi_subdevice *s;
int ret;
- ret = comedi_request_region(dev, it->options[0], 0x10);
+ /*
+ * The datasheet says it requires 16 contiguous addresses and is
+ * "configurable on any even sixteen port boundary". So require
+ * a 32-byte boundary and assume it uses 10-bit addresses like
+ * similar boards.
+ */
+ ret = comedi_check_request_region(dev, it->options[0], 0x10,
+ 0, 0x3ff, 32);
if (ret)
return ret;