fixed bug with initialization of buf_user_ptr and buf_user_count in
authorFrank Mori Hess <fmhess@speakeasy.net>
Sat, 27 Jan 2001 19:36:03 +0000 (19:36 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sat, 27 Jan 2001 19:36:03 +0000 (19:36 +0000)
do_cmd_ioctl for writeable subdevices

comedi/comedi_fops.c

index b32df16ef960f04befe093e038d4ad6496bc415f..18b52912375ae1cd5fe6f0798f1b9356455a482f 100644 (file)
@@ -949,7 +949,7 @@ static int do_cmd_ioctl(comedi_device *dev,void *arg,void *file)
 
        s->buf_int_ptr=0;
        s->buf_int_count=0;
-       if(s->subdev_flags & SDF_READABLE){
+       if(s->subdev_flags & (SDF_READABLE | SDF_WRITEABLE)){
                s->buf_user_ptr=0;
                s->buf_user_count=0;
        }