uvc-gadget: Use new kernel API header
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 20 May 2018 18:59:10 +0000 (21:59 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 20 May 2018 19:06:51 +0000 (22:06 +0300)
The UVC gadget driver now defines its API in the linux/usb/g_uvc.h
public header, use it instead of including an internal kernel header
through a relative path.

The public API doesn't define the UVC_INTF_CONTROL and
UVC_INTF_STREAMING macros, define them locally until we can get rid of
them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
uvc-gadget.c

index 4d59ab8..9c7a479 100644 (file)
 #include <errno.h>
 
 #include <linux/usb/ch9.h>
+#include <linux/usb/g_uvc.h>
 #include <linux/usb/video.h>
 #include <linux/videodev2.h>
 
-#include "../drivers/usb/gadget/uvc.h"
+#define UVC_INTF_CONTROL       0
+#define UVC_INTF_STREAMING     1
 
 #define clamp(val, min, max) ({                 \
         typeof(val) __val = (val);              \