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>
This commit is contained in:
Sean Young
2017-09-26 07:31:29 -04:00
committed by Mauro Carvalho Chehab
parent 71695aff9f
commit 7790e81f7e
5 changed files with 24 additions and 11 deletions

View File

@@ -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);