diff options
author | David Härdeman <david@hardeman.nu> | 2017-05-01 13:03:46 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-06-06 09:00:11 -0300 |
commit | 2c5a1f44667b75e75302d87e61b335e68f4078f1 (patch) | |
tree | 1209d31f78c8a13f6577d6649aab38966d86cbf4 /drivers | |
parent | 52e809f9fe3e4922e1cb539079ad1b262e163a3b (diff) | |
download | lwn-2c5a1f44667b75e75302d87e61b335e68f4078f1.tar.gz lwn-2c5a1f44667b75e75302d87e61b335e68f4078f1.zip |
[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: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/rc/ir-lirc-codec.c | 2 | ||||
-rw-r--r-- | drivers/media/rc/lirc_dev.c | 24 |
2 files changed, 6 insertions, 20 deletions
diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index fc58745b26b8..a30af91710fe 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b/drivers/media/rc/ir-lirc-codec.c @@ -386,8 +386,6 @@ static int ir_lirc_register(struct rc_dev *dev) drv->features = features; drv->data = &dev->raw->lirc; drv->rbuf = NULL; - drv->set_use_inc = NULL; - drv->set_use_dec = NULL; drv->code_length = sizeof(struct ir_raw_event) * 8; drv->chunk_size = sizeof(int); drv->buffer_size = LIRCBUF_SIZE; diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 42704552b005..05f600bd6c67 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -418,12 +418,6 @@ int lirc_unregister_driver(int minor) 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); device_del(&ir->dev); @@ -473,17 +467,13 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file) goto error; } + if (ir->buf) + lirc_buffer_clear(ir->buf); + + if (ir->task) + wake_up_process(ir->task); + 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: nonseekable_open(inode, file); @@ -508,8 +498,6 @@ int lirc_dev_fop_close(struct inode *inode, struct file *file) rc_close(ir->d.rdev); ir->open--; - if (ir->d.set_use_dec) - ir->d.set_use_dec(ir->d.data); if (!ret) mutex_unlock(&lirc_dev_lock); |