summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/usbvideo/quickcam_messenger.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/usbvideo/quickcam_messenger.c')
-rw-r--r--linux/drivers/media/video/usbvideo/quickcam_messenger.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/linux/drivers/media/video/usbvideo/quickcam_messenger.c b/linux/drivers/media/video/usbvideo/quickcam_messenger.c
index 614c821ed..849f94bab 100644
--- a/linux/drivers/media/video/usbvideo/quickcam_messenger.c
+++ b/linux/drivers/media/video/usbvideo/quickcam_messenger.c
@@ -33,15 +33,15 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
-#include "compat.h"
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
-#include <linux/usb_input.h>
-#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
#include <linux/usb/input.h>
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#include <linux/usb_input.h>
#endif
#include "usbvideo.h"
#include "quickcam_messenger.h"
+#include "compat.h"
/*
* Version Information
@@ -105,7 +105,11 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
input_dev->name = "QCM button";
input_dev->phys = cam->input_physname;
usb_to_input_id(dev, &input_dev->id);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &dev->dev;
+#else
+ input_dev->dev = &dev->dev;
+#endif
input_dev->evbit[0] = BIT(EV_KEY);
input_dev->keybit[LONG(BTN_0)] = BIT(BTN_0);