summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2017-09-26 14:44:20 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-14 18:35:19 +0300
commit111429fb73b1f5f584d977614b87ce9e6f8361c6 (patch)
tree89185860b21c868079cb998efde77ab0d5d65792 /include/media
parentcb84343fced1febb5b21a9ef9082a07bfc3e7427 (diff)
downloadlinux-111429fb73b1f5f584d977614b87ce9e6f8361c6.tar.xz
media: lirc: create rc-core open and close lirc functions
Replace the generic kernel lirc api with ones which use rc-core, further reducing the lirc_dev members. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/lirc_dev.h11
-rw-r--r--include/media/rc-core.h2
2 files changed, 2 insertions, 11 deletions
diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h
index 5782add67edd..b45af81b4633 100644
--- a/include/media/lirc_dev.h
+++ b/include/media/lirc_dev.h
@@ -26,8 +26,6 @@
* @rdev: &struct rc_dev associated with the device
* @fops: &struct file_operations for the device
* @owner: the module owning this struct
- * @open: open count for the device's chardev
- * @mutex: serialises file_operations calls
* @dev: &struct device assigned to the device
* @cdev: &struct cdev assigned to the device
*/
@@ -39,10 +37,6 @@ struct lirc_dev {
const struct file_operations *fops;
struct module *owner;
- int open;
-
- struct mutex mutex; /* protect from simultaneous accesses */
-
struct device dev;
struct cdev cdev;
};
@@ -55,9 +49,4 @@ int lirc_register_device(struct lirc_dev *d);
void lirc_unregister_device(struct lirc_dev *d);
-/* default file operations
- * used by drivers if they override only some operations
- */
-int lirc_dev_fop_open(struct inode *inode, struct file *file);
-int lirc_dev_fop_close(struct inode *inode, struct file *file);
#endif
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index b6d719734744..4f585bff1347 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -117,6 +117,7 @@ enum rc_filter_type {
* @rx_resolution : resolution (in ns) of input sampler
* @tx_resolution: resolution (in ns) of output sampler
* @lirc_dev: lirc char device
+ * @lirc_open: count of the number of times the device has been opened
* @carrier_low: when setting the carrier range, first the low end must be
* set with an ioctl and then the high end with another ioctl
* @gap_start: time when gap starts
@@ -190,6 +191,7 @@ struct rc_dev {
u32 tx_resolution;
#ifdef CONFIG_LIRC
struct lirc_dev *lirc_dev;
+ int lirc_open;
int carrier_low;
ktime_t gap_start;
u64 gap_duration;