You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lirc/0008-lirc_sir-fix-resource-...

61 lines
1.7 KiB

From be3ec6c75e33b4a175799218b2921be47ad4c842 Mon Sep 17 00:00:00 2001
From: Jarod Wilson <jarod@redhat.com>
Date: Thu, 31 Mar 2011 17:44:15 -0400
Subject: [PATCH 08/17] lirc_sir: fix resource busy error from bunk lirc_open
Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
drivers/lirc_sir/lirc_sir.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/drivers/lirc_sir/lirc_sir.c b/drivers/lirc_sir/lirc_sir.c
index eefe0c9..c397ce0 100644
--- a/drivers/lirc_sir/lirc_sir.c
+++ b/drivers/lirc_sir/lirc_sir.c
@@ -203,8 +203,6 @@ static int debug;
/* SECTION: Prototypes */
/* Communication with user-space */
-static int lirc_open(struct inode *inode, struct file *file);
-static int lirc_close(struct inode *inode, struct file *file);
static unsigned int lirc_poll(struct file *file, poll_table *wait);
static ssize_t lirc_read(struct file *file, char *buf, size_t count,
loff_t *ppos);
@@ -275,22 +273,6 @@ static void safe_udelay(unsigned long usecs)
/* SECTION: Communication with user-space */
-static int lirc_open(struct inode *inode, struct file *file)
-{
- spin_lock(&dev_lock);
- if (MOD_IN_USE) {
- spin_unlock(&dev_lock);
- return -EBUSY;
- }
- spin_unlock(&dev_lock);
- return 0;
-}
-
-static int lirc_close(struct inode *inode, struct file *file)
-{
- return 0;
-}
-
static unsigned int lirc_poll(struct file *file, poll_table *wait)
{
poll_wait(file, &lirc_read_queue, wait);
@@ -519,8 +501,8 @@ static struct file_operations lirc_fops = {
.compat_ioctl = lirc_ioctl,
#endif
#endif
- .open = lirc_open,
- .release = lirc_close,
+ .open = lirc_dev_fop_open,
+ .release = lirc_dev_fop_close,
};
static int set_use_inc(void *data)
--
1.8.3.1