Skip to content

Commit

Permalink
[media] rc-core: fix protocol_change regression in ir_raw_event_register
Browse files Browse the repository at this point in the history
IR receiver using nuvoton-cir and lirc required additional configuration
steps after upgrade from kernel 3.16 to 3.17-rcX. Bisected regression to
commit da6e162 ("[media] rc-core:
simplify sysfs code").

The regression comes from adding function change_protocol in ir-raw.c.
It changes behaviour so that only the protocol enabled by driver's
map_name will be active after registration. This breaks user space
behaviour, lirc does not get key press signals anymore.

Enable lirc protocol by default for ir raw decoders to restore original
behaviour.

Cc: stable@vger.kernel.org # for v3.17
Signed-off-by: Tomas Melin <tomas.melin@iki.fi>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Tomas Melin authored and Mauro Carvalho Chehab committed Oct 30, 2014
1 parent f7e87a4 commit 14edb59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/media/rc/rc-ir-raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ int ir_raw_event_register(struct rc_dev *dev)
return -ENOMEM;

dev->raw->dev = dev;
dev->enabled_protocols = ~0;
dev->change_protocol = change_protocol;
rc = kfifo_alloc(&dev->raw->kfifo,
sizeof(struct ir_raw_event) * MAX_IR_EVENT_SIZE,
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/rc/rc-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,8 @@ int rc_register_device(struct rc_dev *dev)

if (dev->change_protocol) {
u64 rc_type = (1 << rc_map->rc_type);
if (dev->driver_type == RC_DRIVER_IR_RAW)
rc_type |= RC_BIT_LIRC;
rc = dev->change_protocol(dev, &rc_type);
if (rc < 0)
goto out_raw;
Expand Down

0 comments on commit 14edb59

Please sign in to comment.