[media] media: rc: if protocols can't be changed, don't be writable
authorSean Young <sean@mess.org>
Fri, 1 Sep 2017 14:30:50 +0000 (11:30 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 4 Oct 2017 18:23:50 +0000 (15:23 -0300)
commit6d75db305b8a964bfec337ca5f3c2cd5047b9bb1
tree84488db3f7a2a0977ac668257f776a57b603eb50
parent3c03726aaf3f99f6b08959fcb3c1c409b0c9813d
[media] media: rc: if protocols can't be changed, don't be writable

If the protocols of an rc device cannot be changed, ensure the sysfs
file is not writable.

This makes it possible to detect this from userspace, so ir-keytable
can deal with case without giving an error.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/rc-main.c