diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-02-19 19:27:58 -0800 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2007-02-19 19:27:58 -0800 |
commit | df6112a72da3840ed73c44ba5bdc8f69228d4393 (patch) | |
tree | 11d8df2cb23055daf24c9ea353327d16da745199 /linux/drivers/media/video/usbvideo/konicawc.c | |
parent | 13aac084f52613baf79f047bdac0b0decc2b37d2 (diff) | |
download | mediapointer-dvb-s2-df6112a72da3840ed73c44ba5bdc8f69228d4393.tar.gz mediapointer-dvb-s2-df6112a72da3840ed73c44ba5bdc8f69228d4393.tar.bz2 |
compat: input_dev compat code for konicawc and quickcam_messenger
From: Trent Piepho <xyzzy@speakeasy.org>
Adjust konicawc and quickcam_messenger to use backward compat code
relating to changes in the input layer in 2.6.15. They should now work
in 2.6.12.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video/usbvideo/konicawc.c')
-rw-r--r-- | linux/drivers/media/video/usbvideo/konicawc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/linux/drivers/media/video/usbvideo/konicawc.c b/linux/drivers/media/video/usbvideo/konicawc.c index 5ab17aaab..8ca93f248 100644 --- a/linux/drivers/media/video/usbvideo/konicawc.c +++ b/linux/drivers/media/video/usbvideo/konicawc.c @@ -15,15 +15,16 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> -#include "compat.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) -#include <linux/input.h> +#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> #else -#include <linux/usb/input.h> +#include <linux/input.h> #endif #include "usbvideo.h" +#include "compat.h" #define MAX_BRIGHTNESS 108 #define MAX_CONTRAST 108 @@ -242,7 +243,11 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev input_dev->name = "Konicawc snapshot 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); |