linux/drivers/media/rc
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
..
img-ir
keymaps
ati_remote.c
ene_ir.c
ene_ir.h
fintek-cir.c
fintek-cir.h
gpio-ir-recv.c
igorplugusb.c
iguanair.c
imon.c
ir-hix5hd2.c
ir-jvc-decoder.c
ir-lirc-codec.c
ir-mce_kbd-decoder.c
ir-nec-decoder.c
ir-rc5-decoder.c
ir-rc6-decoder.c
ir-rx51.c
ir-sanyo-decoder.c
ir-sharp-decoder.c
ir-sony-decoder.c
ir-xmp-decoder.c
ite-cir.c
ite-cir.h
Kconfig
lirc_dev.c
Makefile
mceusb.c
meson-ir.c
nuvoton-cir.c
nuvoton-cir.h
rc-core-priv.h
rc-ir-raw.c
rc-loopback.c
rc-main.c [media] rc-main: Re-apply filter for no-op protocol change 2014-12-23 16:21:45 -02:00
redrat3.c
st_rc.c
streamzap.c
sunxi-cir.c
ttusbir.c
winbond-cir.c