Commit 2c5a1f44 authored by David Härdeman's avatar David Härdeman Committed by Mauro Carvalho Chehab

[media] lirc_dev: remove unused set_use_inc/set_use_dec

Since there are no users of this functionality, it can be removed
altogether.
Signed-off-by: default avatarDavid Härdeman <david@hardeman.nu>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 52e809f9
...@@ -386,8 +386,6 @@ static int ir_lirc_register(struct rc_dev *dev) ...@@ -386,8 +386,6 @@ static int ir_lirc_register(struct rc_dev *dev)
drv->features = features; drv->features = features;
drv->data = &dev->raw->lirc; drv->data = &dev->raw->lirc;
drv->rbuf = NULL; drv->rbuf = NULL;
drv->set_use_inc = NULL;
drv->set_use_dec = NULL;
drv->code_length = sizeof(struct ir_raw_event) * 8; drv->code_length = sizeof(struct ir_raw_event) * 8;
drv->chunk_size = sizeof(int); drv->chunk_size = sizeof(int);
drv->buffer_size = LIRCBUF_SIZE; drv->buffer_size = LIRCBUF_SIZE;
......
...@@ -418,12 +418,6 @@ int lirc_unregister_driver(int minor) ...@@ -418,12 +418,6 @@ int lirc_unregister_driver(int minor)
wake_up_interruptible(&ir->buf->wait_poll); wake_up_interruptible(&ir->buf->wait_poll);
} }
mutex_lock(&ir->irctl_lock);
if (ir->d.set_use_dec)
ir->d.set_use_dec(ir->d.data);
mutex_unlock(&ir->irctl_lock);
mutex_unlock(&lirc_dev_lock); mutex_unlock(&lirc_dev_lock);
device_del(&ir->dev); device_del(&ir->dev);
...@@ -473,17 +467,13 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file) ...@@ -473,17 +467,13 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file)
goto error; goto error;
} }
if (ir->buf)
lirc_buffer_clear(ir->buf);
if (ir->task)
wake_up_process(ir->task);
ir->open++; ir->open++;
if (ir->d.set_use_inc)
retval = ir->d.set_use_inc(ir->d.data);
if (retval) {
ir->open--;
} else {
if (ir->buf)
lirc_buffer_clear(ir->buf);
if (ir->task)
wake_up_process(ir->task);
}
error: error:
nonseekable_open(inode, file); nonseekable_open(inode, file);
...@@ -508,8 +498,6 @@ int lirc_dev_fop_close(struct inode *inode, struct file *file) ...@@ -508,8 +498,6 @@ int lirc_dev_fop_close(struct inode *inode, struct file *file)
rc_close(ir->d.rdev); rc_close(ir->d.rdev);
ir->open--; ir->open--;
if (ir->d.set_use_dec)
ir->d.set_use_dec(ir->d.data);
if (!ret) if (!ret)
mutex_unlock(&lirc_dev_lock); mutex_unlock(&lirc_dev_lock);
......
...@@ -165,10 +165,6 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf, ...@@ -165,10 +165,6 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf,
* have to write to the buffer by other means, like irq's * have to write to the buffer by other means, like irq's
* (see also lirc_serial.c). * (see also lirc_serial.c).
* *
* @set_use_inc: set_use_inc will be called after device is opened
*
* @set_use_dec: set_use_dec will be called after device is closed
*
* @rdev: Pointed to struct rc_dev associated with the LIRC * @rdev: Pointed to struct rc_dev associated with the LIRC
* device. * device.
* *
...@@ -198,8 +194,6 @@ struct lirc_driver { ...@@ -198,8 +194,6 @@ struct lirc_driver {
int max_timeout; int max_timeout;
int (*add_to_buf)(void *data, struct lirc_buffer *buf); int (*add_to_buf)(void *data, struct lirc_buffer *buf);
struct lirc_buffer *rbuf; struct lirc_buffer *rbuf;
int (*set_use_inc)(void *data);
void (*set_use_dec)(void *data);
struct rc_dev *rdev; struct rc_dev *rdev;
const struct file_operations *fops; const struct file_operations *fops;
struct device *dev; struct device *dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment