summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/uvc/uvc_status.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/uvc/uvc_status.c')
-rw-r--r--linux/drivers/media/video/uvc/uvc_status.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/media/video/uvc/uvc_status.c b/linux/drivers/media/video/uvc/uvc_status.c
index 5d60b264d..ab62d7bf9 100644
--- a/linux/drivers/media/video/uvc/uvc_status.c
+++ b/linux/drivers/media/video/uvc/uvc_status.c
@@ -15,7 +15,11 @@
#include <linux/version.h>
#include <linux/input.h>
#include <linux/usb.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
+#include <linux/usb_input.h>
+#else
#include <linux/usb/input.h>
+#endif
#include "uvcvideo.h"
@@ -45,7 +49,11 @@ static int uvc_input_init(struct uvc_device *dev)
input->name = dev->name;
input->phys = phys;
usb_to_input_id(udev, &input->id);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
input->dev.parent = &dev->intf->dev;
+#else
+ input->cdev.dev = &dev->intf->dev;
+#endif
set_bit(EV_KEY, input->evbit);
set_bit(BTN_0, input->keybit);
@@ -118,7 +126,11 @@ static void uvc_event_control(struct uvc_device *dev, __u8 *data, int len)
data[1], data[3], attrs[data[4]], len);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
+static void uvc_status_complete(struct urb *urb, struct pt_regs *regs)
+#else
static void uvc_status_complete(struct urb *urb)
+#endif
{
struct uvc_device *dev = urb->context;
int len, ret;