LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Register the bus, vendor and product IDs for dvb-usb remote device
@ 2007-01-21  2:47 Chris Rankin
  2007-01-21 19:12 ` [v4l-dvb-maintainer] " Michael Krufky
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Rankin @ 2007-01-21  2:47 UTC (permalink / raw)
  To: v4l-dvb-maintainer; +Cc: linux-dvb, linux-kernel

Hi,

This patch writes the USB vendor and product IDs into the /sys/class/input/inputX/id/ files, so
that udev can find them. A rule like this does the trick for me:

KERNEL="event*", SYSFS{../id/vendor}=="2040", SYSFS{../id/product}=="9301",
SYMLINK+="input/dvb-remote"

--- linux-2.6.18/drivers/media/dvb/dvb-usb/dvb-usb-remote.c.old 2007-01-21 02:43:11.000000000
+0000
+++ linux-2.6.18/drivers/media/dvb/dvb-usb/dvb-usb-remote.c     2007-01-21 02:39:02.000000000
+0000
@@ -107,6 +107,9 @@
        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;
+       d->rc_input_dev->id.bustype = BUS_USB;
+       d->rc_input_dev->id.vendor = d->udev->descriptor.idVendor;
+       d->rc_input_dev->id.product = d->udev->descriptor.idProduct;

        /* set the bits for the keys */
        deb_rc("key map size: %d\n", d->props.rc_key_map_size);

Cheers,
Chris



		
___________________________________________________________ 
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-22  5:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-21  2:47 [PATCH] Register the bus, vendor and product IDs for dvb-usb remote device Chris Rankin
2007-01-21 19:12 ` [v4l-dvb-maintainer] " Michael Krufky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).