diff options
author | David Härdeman <david@hardeman.nu> | 2017-06-25 14:31:40 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2017-10-04 18:52:12 +0200 |
commit | 615cd3fe6cccb950b46728120009a1805cce908e (patch) | |
tree | dacdfa3104b3b7dfeae4a4d821ed01a5b477b2ac /include/media/lirc_dev.h | |
parent | [media] media: lirc_dev: use cdev_device_add() helper function (diff) | |
download | linux-615cd3fe6cccb950b46728120009a1805cce908e.tar.xz linux-615cd3fe6cccb950b46728120009a1805cce908e.zip |
[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>
Diffstat (limited to 'include/media/lirc_dev.h')
-rw-r--r-- | include/media/lirc_dev.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h index 1bb9890744fa..d07a53232ffc 100644 --- a/include/media/lirc_dev.h +++ b/include/media/lirc_dev.h @@ -187,6 +187,9 @@ int lirc_register_driver(struct lirc_driver *d); void lirc_unregister_driver(struct lirc_driver *d); +/* Must be called in the open fop before lirc_get_pdata() can be used */ +void lirc_init_pdata(struct inode *inode, struct file *file); + /* Returns the private data stored in the lirc_driver * associated with the given device file pointer. */ |