summaryrefslogtreecommitdiffstats
path: root/drivers/media/IR/streamzap.c
diff options
context:
space:
mode:
authorPaul Bender2010-12-16 17:23:07 +0100
committerMauro Carvalho Chehab2010-12-20 17:11:13 +0100
commit635f76b2aa8ef3e8436dedddc8baa6f7f438dc40 (patch)
treefcea028217fc1766685a2013a644b8636745da8b /drivers/media/IR/streamzap.c
parent[media] streamzap: merge timeout space with trailing space (diff)
downloadkernel-qcow2-linux-635f76b2aa8ef3e8436dedddc8baa6f7f438dc40.tar.gz
kernel-qcow2-linux-635f76b2aa8ef3e8436dedddc8baa6f7f438dc40.tar.xz
kernel-qcow2-linux-635f76b2aa8ef3e8436dedddc8baa6f7f438dc40.zip
[media] rc: fix sysfs entry for mceusb and streamzap
When trying to create persistent device names for mceusb and streamzap devices, I noticed that their respective drivers are not creating the rc device as a child of the USB device. Rather it creates it as virtual device. As a result, udev cannot use the USB device information to create persistent device names for event and lirc devices associated with the rc device. Not having persistent device names makes it more difficult to make use of the devices in userspace as their names can change. Signed-off-by: Paul Bender <pebender@gmail.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/streamzap.c')
-rw-r--r--drivers/media/IR/streamzap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/IR/streamzap.c b/drivers/media/IR/streamzap.c
index c6157ee73ffa..3a20aef67d08 100644
--- a/drivers/media/IR/streamzap.c
+++ b/drivers/media/IR/streamzap.c
@@ -34,8 +34,9 @@
#include <linux/device.h>
#include <linux/module.h>
#include <linux/slab.h>
-#include <linux/usb.h>
#include <linux/input.h>
+#include <linux/usb.h>
+#include <linux/usb/input.h>
#include <media/ir-core.h>
#define DRIVER_VERSION "1.61"
@@ -332,6 +333,9 @@ static struct input_dev *streamzap_init_input_dev(struct streamzap_ir *sz)
sz->props = props;
+ usb_to_input_id(sz->usbdev, &idev->id);
+ idev->dev.parent = sz->dev;
+
ret = ir_input_register(idev, RC_MAP_STREAMZAP, props, DRIVER_NAME);
if (ret < 0) {
dev_err(dev, "remote input device register failed\n");