From 4cfffbc7931f9e367fbca31dd00d713bf3d8159c Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 10 May 2000 22:51:42 +0000 Subject: [PATCH] range fixes for multiple channels --- comedi/comedi_fops.c | 4 ++-- comedi/range.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index b6f1e0ac..4f025d53 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -204,7 +204,7 @@ static int do_subdinfo_ioctl(comedi_device *dev,comedi_subdinfo *arg,void *file) us->len_chanlist = s->len_chanlist; us->maxdata = s->maxdata; if(s->range_table){ - us->range_type = (dev->minor<<24)|(i<<20)|(0<<16)| + us->range_type = (dev->minor<<28)|(i<<24)|(0<<16)| (s->range_table->length); }else{ us->range_type = 0; /* XXX */ @@ -291,7 +291,7 @@ static int do_chaninfo_ioctl(comedi_device *dev,comedi_chaninfo *arg) for(i=0;in_chan;i++){ int x; - x=(dev->minor<<24)|(it.subdev<<20)|(i<<16)| + x=(dev->minor<<28)|(it.subdev<<24)|(i<<16)| (s->range_table_list[i]->length); put_user(x,it.rangelist+i); } diff --git a/comedi/range.c b/comedi/range.c index 21b7bc1e..bce10dc2 100644 --- a/comedi/range.c +++ b/comedi/range.c @@ -57,8 +57,8 @@ int do_rangeinfo_ioctl(comedi_device *dev,comedi_rangeinfo *arg) if(copy_from_user(&it,arg,sizeof(comedi_rangeinfo))) return -EFAULT; - minor=(it.range_type>>24)&0xf; - subd=(it.range_type>>20)&0xf; + minor=(it.range_type>>28)&0xf; + subd=(it.range_type>>24)&0xf; chan=(it.range_type>>16)&0xff; if(minor>COMEDI_NDEVICES) -- 2.26.2