linux/drivers/media
James Hogan 983c5bd26b [media] rc-main: Re-apply filter for no-op protocol change
Since commit da6e162d6a ("[media] rc-core: simplify sysfs code"), when
the IR protocol is set using the sysfs interface to the same set of
protocols that are already set, store_protocols() does not refresh the
scancode filter with the new protocol, even if it has already called the
change_protocol() callback successfully. This results in the filter
being disabled in the hardware and not re-enabled until the filter is
set again using sysfs.

Fix in store_protocols() by still re-applying the filter whenever the
change_protocol() driver callback succeeded.

The problem can be reproduced with the img-ir driver by setting a
filter, and then setting the protocol to the same protocol that is
already set:
$ echo nec > protocols
$ echo 0xffff > filter_mask
$ echo nec > protocols

After this, messages which don't match the filter were still being
received.

Fixes: da6e162d6a ("[media] rc-core: simplify sysfs code")

Reported-by: Sifan Naeem <sifan.naeem@imgtec.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: David Härdeman <david@hardeman.nu>
Cc: <stable@vger.kernel.org> # v3.17+
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 16:21:45 -02:00
..
common [media] btcx-risc: move to bt8xx 2014-12-23 10:13:19 -02:00
dvb-core [media] cxusb: Geniatech T230 support 2014-11-25 09:15:54 -02:00
dvb-frontends [media] mn88472: calculate the IF register values 2014-12-23 14:46:02 -02:00
firewire [media] firewire: Deletion of an unnecessary check before the function call "dvb_unregister_device" 2014-11-25 13:30:31 -02:00
i2c [media] smiapp: Add parentheses to macro arguments used in macros 2014-12-23 11:51:30 -02:00
mmc
pci [media] ivtv: fix sparse warning 2014-12-23 10:40:59 -02:00
platform [media] media: platform: add VPFE capture driver support for AM437X 2014-12-23 12:09:58 -02:00
radio Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
rc [media] rc-main: Re-apply filter for no-op protocol change 2014-12-23 16:21:45 -02:00
tuners [media] media: remove emacs editor variables 2014-12-22 17:52:20 -02:00
usb [media] em28xx-video: fix missing newlines 2014-12-23 14:46:08 -02:00
v4l2-core [media] videobuf2-vmalloc: fix sparse warning 2014-12-23 10:41:43 -02:00
Kconfig [media] bq/c-qcam, w9966, pms: move to staging in preparation for removal 2014-12-16 23:21:44 -02:00
Makefile [media] bq/c-qcam, w9966, pms: move to staging in preparation for removal 2014-12-16 23:21:44 -02:00
media-device.c [media] media: Use strlcpy instead of custom code 2014-09-21 20:27:08 -03:00
media-devnode.c [media] media-devnode: just return 0 instead of using a var 2014-09-03 17:59:28 -03:00
media-entity.c [media] media: Fix a compiler warning in media_entity_pipeline_start() 2014-11-03 19:09:13 -02:00