summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uvc-gadget.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/uvc-gadget.c b/uvc-gadget.c
index 7d6c20a..12a361d 100644
--- a/uvc-gadget.c
+++ b/uvc-gadget.c
@@ -39,21 +39,11 @@
#include <linux/videodev2.h>
#include "events.h"
+#include "tools.h"
#define UVC_INTF_CONTROL 0
#define UVC_INTF_STREAMING 1
-#define clamp(val, min, max) ({ \
- typeof(val) __val = (val); \
- typeof(min) __min = (min); \
- typeof(max) __max = (max); \
- (void) (&__val == &__min); \
- (void) (&__val == &__max); \
- __val = __val < __min ? __min: __val; \
- __val > __max ? __max: __val; })
-
-#define ARRAY_SIZE(a) ((sizeof(a) / sizeof(a[0])))
-
struct uvc_device
{
int fd;