From ec30827c59527dfe961b0617f509c78f6ac39ce4 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Mon, 8 Jul 2013 13:03:38 +0200 Subject: [PATCH] use minimum tiemout value from call/libusb --- hmcfgusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hmcfgusb.c b/hmcfgusb.c index f35138f..65b4763 100644 --- a/hmcfgusb.c +++ b/hmcfgusb.c @@ -407,6 +407,9 @@ int hmcfgusb_poll(struct hmcfgusb_dev *dev, int timeout) } else { if ((tv.tv_sec == 0) && (tv.tv_usec == 0)) { usb_event = 1; + } else if (tv.tv_sec > timeout) { + tv.tv_sec = timeout; + tv.tv_usec = 0; } } -- 2.39.5