demo/pwm: Bug fix - should have called comedi_close()
authorIan Abbott <abbotti@mev.co.uk>
Mon, 14 May 2012 13:51:06 +0000 (14:51 +0100)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 14 May 2012 13:51:06 +0000 (14:51 +0100)
The code called close(device) instead of comedi_close(device) where
device came from comedi_open.

demo/pwm.c

index ede2ec70ee08e2b4c457fbdcdec9d89ac8319cdb..e3fbf6916c3e6dd77ff538ccbd8ca5d2cc8ddcc8 100644 (file)
@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
 
        if(options.n_scan==2) {
                printf("%d\n",comedi_get_maxdata(device,options.subdevice,0));
-               close(device);
+               comedi_close(device);
                exit(0);
        }