From 83309226a2d2b934497122b49b6f8cbb3b6f224b Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sun, 27 Aug 2006 19:01:24 -0700 Subject: Sync'ing dvb-usb-remote with changes in USB input subsystem From: Unai Uribarri This patch fixes the physical address and takes into account recent changes in the USB input subsystem. Signed-off-by: Unai Uribarri Acked-by: Dmitry Torokhov Signed-off-by: Trent Piepho --- linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c') 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 +#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) +#include +#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); -- cgit v1.2.3