diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2006-08-27 19:01:24 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2006-08-27 19:01:24 -0700 |
commit | 83309226a2d2b934497122b49b6f8cbb3b6f224b (patch) | |
tree | c7ff2f24a12b803161ee0d4aad5c8f82d223c95e /linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | |
parent | 28f08f0ca6a628da637c6219169cf101958ba878 (diff) | |
download | mediapointer-dvb-s2-83309226a2d2b934497122b49b6f8cbb3b6f224b.tar.gz mediapointer-dvb-s2-83309226a2d2b934497122b49b6f8cbb3b6f224b.tar.bz2 |
Sync'ing dvb-usb-remote with changes in USB input subsystem
From: Unai Uribarri <unaiur@gmail.com>
This patch fixes the physical address and takes into account recent
changes in the USB input subsystem.
Signed-off-by: Unai Uribarri <unaiur@gmail.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index e5c6d9835..0dd4275f7 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c @@ -6,6 +6,13 @@ * This file contains functions for initializing the the input-device and for handling remote-control-queries. */ #include "dvb-usb-common.h" +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) +#include <linux/usb/input.h> +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) +#include <linux/usb_input.h> +#endif +#endif /* Remote-control poll function - called every dib->rc_query_interval ms to see * whether the remote control has received anything. @@ -96,7 +103,7 @@ int dvb_usb_remote_init(struct dvb_usb_device *d) return 0; usb_make_path(d->udev, d->rc_phys, sizeof(d->rc_phys)); - strlcpy(d->rc_phys, "/ir0", sizeof(d->rc_phys)); + strlcat(d->rc_phys, "/ir0", sizeof(d->rc_phys)); d->rc_input_dev = input_allocate_device(); if (!d->rc_input_dev) @@ -107,6 +114,10 @@ int dvb_usb_remote_init(struct dvb_usb_device *d) d->rc_input_dev->keycodemax = KEY_MAX; d->rc_input_dev->name = "IR-receiver inside an USB DVB receiver"; d->rc_input_dev->phys = d->rc_phys; + usb_to_input_id(d->udev, &d->rc_input_dev->id); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) + d->rc_input_dev->cdev.dev = &d->udev->dev; +#endif /* set the bits for the keys */ deb_rc("key map size: %d\n", d->props.rc_key_map_size); |