summaryrefslogtreecommitdiff
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2017-12-13 16:17:44 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-18 15:21:49 -0500
commit7b3aa7146eeed0f2356a92c0edf5e5c829121070 (patch)
tree0f4e429dee3762c18e485e66cce75f3caac8ed24 /drivers/media/rc
parenta74b2bff59455d466a4422ee2f49151ffd65a2ab (diff)
media: lirc: no need to recalculate duration
This is code existed for when drivers would send less than the whole buffer; no driver does this any more, so this is redundant. Drivers should return -EINVAL if they cannot send the entire buffer. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/lirc_dev.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 8618aba152c6..1fc1fd665bce 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -347,15 +347,6 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf,
if (ret < 0)
goto out_kfree;
- if (fh->send_mode == LIRC_MODE_SCANCODE) {
- ret = n;
- } else {
- for (duration = i = 0; i < ret; i++)
- duration += txbuf[i];
-
- ret *= sizeof(unsigned int);
- }
-
/*
* The lircd gap calculation expects the write function to
* wait for the actual IR signal to be transmitted before
@@ -368,6 +359,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf,
schedule_timeout(usecs_to_jiffies(towait));
}
+ ret = n;
out_kfree:
kfree(txbuf);
kfree(raw);