On jue, 2006-07-27 at 03:15 -0700, Trent Piepho wrote: > I do not really know anything about how this usb input device stuff works, > so I can't comment on if the patch is really correct or not in that > respect. The strlcpy to strlcat change does seem strange to me. It seems > like one of them must have been very wrong. What is really strange is to get the usb physical identifier and then overwrite it with "/ir0". So I suppose that it's just a typo. Nevertheless, you can also see how is done in usbmouse.c: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;h=446935b671d989e72e270752fffa77e33a5348ae;hb=64821324ca49f24be1a66f2f432108f96a24e596;f=drivers/usb/input/usbmouse.c#l171 > The linux/usb_input.h header file moved to linux/usb/input.h in 2.6.18, so > you should update the patch to take this into account. > > You might want to look at this unapplied patch here to see what must be done > to make usb input stuff work for kernels < 2.6.18, < 2.6.15, and < 2.6.13: > http://linuxtv.org/hg/~tap/compat?cmd=changeset;node=dd9dece7bc70;style=gitweb I've updated the patch to take into account these API changes.
# HG changeset patch # User Unai Uribarri <unaiur@xxxxxxxxx> # Node ID e83b66e3c1ef6feee217a84f1a40218db548acb3 # Parent 6ddc79dc9d54ce064146b0b6da933b36aa81e513 [PATCH] Sync'ing dvb-usb-remote with changes in USB input subsystem From: Unai Uribarri <unaiur@xxxxxxxxx> This patch fixes the physical address and takes into account recent changes in the USB input subsystem. Signed-off-by: Unai Uribarri <unaiur@xxxxxxxxx> diff -r 6ddc79dc9d54 -r e83b66e3c1ef linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c Sun Jul 23 06:36:05 2006 -0300 +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c Fri Jul 28 00:53:24 2006 +0200 @@ -6,6 +6,11 @@ * 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> +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) +#include <linux/usb_input.h> +#endif /* Remote-control poll function - called every dib->rc_query_interval ms to see * whether the remote control has received anything. @@ -96,7 +101,7 @@ int dvb_usb_remote_init(struct dvb_usb_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 +112,12 @@ int dvb_usb_remote_init(struct dvb_usb_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; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) + usb_to_input_id(d->udev, &d->rc_input_dev->id); +#endif +#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);
_______________________________________________ linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb