diff options
author | Sean Young <sean@mess.org> | 2017-09-26 07:31:29 -0400 |
---|---|---|
committer | Tao Huang <huangtao@rock-chips.com> | 2018-12-10 20:36:26 +0800 |
commit | 414df6823c652692247e1621bc4d432ee1792b50 (patch) | |
tree | 928f84f94cb8595ce8f7cf856d1ec0897f50734a /include | |
parent | 47a46f59c3596b42b4e4d2275f641d7eeb669de5 (diff) |
UPSTREAM: media: lirc: move lirc_dev->attached to rc_dev->registered
This is done to further remove the lirc kernel api. Ensure that every
fops checks for this.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 7790e81f7e1f7f122f8fcccd91443a2571421aba)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/lirc_dev.h | 2 | ||||
-rw-r--r-- | include/media/rc-core.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h index 14d3eb36672e..5782add67edd 100644 --- a/include/media/lirc_dev.h +++ b/include/media/lirc_dev.h @@ -26,7 +26,6 @@ * @rdev: &struct rc_dev associated with the device * @fops: &struct file_operations for the device * @owner: the module owning this struct - * @attached: if the device is still live * @open: open count for the device's chardev * @mutex: serialises file_operations calls * @dev: &struct device assigned to the device @@ -40,7 +39,6 @@ struct lirc_dev { const struct file_operations *fops; struct module *owner; - bool attached; int open; struct mutex mutex; /* protect from simultaneous accesses */ diff --git a/include/media/rc-core.h b/include/media/rc-core.h index 24b4fcf97498..6c571e53d166 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h @@ -127,6 +127,8 @@ enum rc_filter_type { * @wait_poll: poll struct for lirc device * @send_mode: lirc mode for sending, either LIRC_MODE_SCANCODE or * LIRC_MODE_PULSE + * @registered: set to true by rc_register_device(), false by + * rc_unregister_device * @change_protocol: allow changing the protocol used on hardware decoders * @open: callback to allow drivers to enable polling/irq when IR input device * is opened. @@ -197,6 +199,7 @@ struct rc_dev { wait_queue_head_t wait_poll; u8 send_mode; #endif + bool registered; int (*change_protocol)(struct rc_dev *dev, u64 *rc_proto); int (*open)(struct rc_dev *dev); void (*close)(struct rc_dev *dev); |