aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Bender <pebender@gmail.com>2010-11-17 14:56:17 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:57 -0500
commit5ad1a55542dd69d2c6aa7db5ca79073d693bbfed (patch)
tree39e92b5a0519d0afe9bd920ba21c28ecda01325a
parent5df465df7bd9c352289ca63d4d9f78299be72c7d (diff)
[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. Forward-ported to media_tree staging/for_v2.6.38 and tested with both streamzap and mceusb devices: $ ll /dev/input/by-id/ ... lrwxrwxrwx. 1 root root 9 Nov 17 17:06 usb-Streamzap__Inc._Streamzap_Remote_Control-event-if00 -> ../event6 lrwxrwxrwx. 1 root root 9 Nov 17 17:05 usb-Topseed_Technology_Corp._eHome_Infrared_Transceiver_TS000BzY-event-if00 -> ../event5 Previously, nada. Signed-off-by: Paul Bender <pebender@gmail.com> Tested-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/rc/mceusb.c2
-rw-r--r--drivers/media/rc/streamzap.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index c2cb58a0c6ed..0fef6efad537 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -1047,7 +1047,7 @@ static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir)
1047 1047
1048 snprintf(ir->name, sizeof(ir->name), "%s (%04x:%04x)", 1048 snprintf(ir->name, sizeof(ir->name), "%s (%04x:%04x)",
1049 mceusb_model[ir->model].name ? 1049 mceusb_model[ir->model].name ?
1050 mceusb_model[ir->model].name : 1050 mceusb_model[ir->model].name :
1051 "Media Center Ed. eHome Infrared Remote Transceiver", 1051 "Media Center Ed. eHome Infrared Remote Transceiver",
1052 le16_to_cpu(ir->usbdev->descriptor.idVendor), 1052 le16_to_cpu(ir->usbdev->descriptor.idVendor),
1053 le16_to_cpu(ir->usbdev->descriptor.idProduct)); 1053 le16_to_cpu(ir->usbdev->descriptor.idProduct));
diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c
index 7814ec709bfc..7f82f55159da 100644
--- a/drivers/media/rc/streamzap.c
+++ b/drivers/media/rc/streamzap.c
@@ -316,6 +316,8 @@ static struct rc_dev *streamzap_init_rc_dev(struct streamzap_ir *sz)
316 316
317 rdev->input_name = sz->name; 317 rdev->input_name = sz->name;
318 rdev->input_phys = sz->phys; 318 rdev->input_phys = sz->phys;
319 usb_to_input_id(sz->usbdev, &rdev->input_id);
320 rdev->dev.parent = dev;
319 rdev->priv = sz; 321 rdev->priv = sz;
320 rdev->driver_type = RC_DRIVER_IR_RAW; 322 rdev->driver_type = RC_DRIVER_IR_RAW;
321 rdev->allowed_protos = RC_TYPE_ALL; 323 rdev->allowed_protos = RC_TYPE_ALL;