[media] media: lirc_dev: make better use of file->private_data
authorDavid Härdeman <david@hardeman.nu>
Sun, 25 Jun 2017 12:31:40 +0000 (09:31 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 4 Oct 2017 16:52:12 +0000 (13:52 -0300)
commit615cd3fe6cccb950b46728120009a1805cce908e
treedacdfa3104b3b7dfeae4a4d821ed01a5b477b2ac
parent0510d81081498eae2a8bf9d116cc03492fab5894
[media] media: lirc_dev: make better use of file->private_data

By making better use of file->private_data in lirc_dev we can avoid
digging around in the irctls[] array, thereby simplifying the code.

External drivers need to use lirc_get_pdata() instead of mucking around
in file->private_data.

The newly introduced lirc_init_pdata() function isn't very elegant, but
it's a stopgap measure which can be removed once lirc_zilog is converted
to rc-core.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/lirc_dev.c
drivers/staging/media/lirc/lirc_zilog.c
include/media/lirc_dev.h