From 7a8b838e6682ee798e7b0979bf0ea545b3def7e5 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 13 May 2016 16:42:14 +0100 Subject: [PATCH] demo: poll: fix polling of wrong subdevice The call to comedi_poll() always sets the subdevice parameter to 0. Set it to the subdevice that the streaming command is using. --- demo/poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/poll.c b/demo/poll.c index d678b19..fb8dffd 100644 --- a/demo/poll.c +++ b/demo/poll.c @@ -123,7 +123,7 @@ void do_cmd(comedi_t *dev,comedi_cmd *cmd) }else if(ret==0){ /* hit timeout */ printf("timeout, polling...\n"); - ret = comedi_poll(device,0); + ret = comedi_poll(device,cmd->subdev); printf("poll returned %d\n",ret); }else if(FD_ISSET(comedi_fileno(device),&rdset)){ /* comedi file descriptor became ready */