diff options
Diffstat (limited to 'examples/dpfp_threaded.c')
-rw-r--r-- | examples/dpfp_threaded.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/dpfp_threaded.c b/examples/dpfp_threaded.c index 2d106d3..59540e3 100644 --- a/examples/dpfp_threaded.c +++ b/examples/dpfp_threaded.c @@ -83,7 +83,7 @@ static void *poll_thread_main(void *arg) while (!do_exit) { struct timeval tv = { 1, 0 }; - r = libusb_handle_events_timeout(&tv); + r = libusb_handle_events_timeout(NULL, &tv); if (r < 0) { request_exit(2); break; @@ -96,7 +96,7 @@ static void *poll_thread_main(void *arg) static int find_dpfp_device(void) { - devh = libusb_open_device_with_vid_pid(0x05ba, 0x000a); + devh = libusb_open_device_with_vid_pid(NULL, 0x05ba, 0x000a); return devh ? 0 : -EIO; } @@ -374,7 +374,7 @@ static int init_capture(void) if (r < 0) { libusb_cancel_transfer(irq_transfer); while (irq_transfer) - if (libusb_handle_events() < 0) + if (libusb_handle_events(NULL) < 0) break; return r; } @@ -446,7 +446,7 @@ int main(void) struct sigaction sigact; int r = 1; - r = libusb_init(); + r = libusb_init(NULL); if (r < 0) { fprintf(stderr, "failed to initialise libusb\n"); exit(1); @@ -522,7 +522,7 @@ int main(void) } while (img_transfer || irq_transfer) - if (libusb_handle_events() < 0) + if (libusb_handle_events(NULL) < 0) break; if (do_exit == 1) @@ -539,7 +539,7 @@ out_release: libusb_release_interface(devh, 0); out: libusb_close(devh); - libusb_exit(); + libusb_exit(NULL); return r >= 0 ? r : -r; } |