diff options
Diffstat (limited to 'drivers/media/rc/rc-loopback.c')
-rw-r--r-- | drivers/media/rc/rc-loopback.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/media/rc/rc-loopback.c b/drivers/media/rc/rc-loopback.c index fae1615e0ff..f9be68132c6 100644 --- a/drivers/media/rc/rc-loopback.c +++ b/drivers/media/rc/rc-loopback.c | |||
@@ -105,18 +105,9 @@ static int loop_tx_ir(struct rc_dev *dev, unsigned *txbuf, unsigned count) | |||
105 | { | 105 | { |
106 | struct loopback_dev *lodev = dev->priv; | 106 | struct loopback_dev *lodev = dev->priv; |
107 | u32 rxmask; | 107 | u32 rxmask; |
108 | unsigned total_duration = 0; | ||
109 | unsigned i; | 108 | unsigned i; |
110 | DEFINE_IR_RAW_EVENT(rawir); | 109 | DEFINE_IR_RAW_EVENT(rawir); |
111 | 110 | ||
112 | for (i = 0; i < count; i++) | ||
113 | total_duration += abs(txbuf[i]); | ||
114 | |||
115 | if (total_duration == 0) { | ||
116 | dprintk("invalid tx data, total duration zero\n"); | ||
117 | return -EINVAL; | ||
118 | } | ||
119 | |||
120 | if (lodev->txcarrier < lodev->rxcarriermin || | 111 | if (lodev->txcarrier < lodev->rxcarriermin || |
121 | lodev->txcarrier > lodev->rxcarriermax) { | 112 | lodev->txcarrier > lodev->rxcarriermax) { |
122 | dprintk("ignoring tx, carrier out of range\n"); | 113 | dprintk("ignoring tx, carrier out of range\n"); |
@@ -148,9 +139,6 @@ static int loop_tx_ir(struct rc_dev *dev, unsigned *txbuf, unsigned count) | |||
148 | ir_raw_event_handle(dev); | 139 | ir_raw_event_handle(dev); |
149 | 140 | ||
150 | out: | 141 | out: |
151 | /* Lirc expects this function to take as long as the total duration */ | ||
152 | set_current_state(TASK_INTERRUPTIBLE); | ||
153 | schedule_timeout(usecs_to_jiffies(total_duration)); | ||
154 | return count; | 142 | return count; |
155 | } | 143 | } |
156 | 144 | ||