diff options
Diffstat (limited to 'drivers/media/IR/ir-rc5-decoder.c')
-rw-r--r-- | drivers/media/IR/ir-rc5-decoder.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/drivers/media/IR/ir-rc5-decoder.c b/drivers/media/IR/ir-rc5-decoder.c index 4b7eafecd842..61b58397a3c2 100644 --- a/drivers/media/IR/ir-rc5-decoder.c +++ b/drivers/media/IR/ir-rc5-decoder.c | |||
@@ -142,7 +142,7 @@ static struct attribute_group decoder_attribute_group = { | |||
142 | * | 142 | * |
143 | * This function returns -EINVAL if the pulse violates the state machine | 143 | * This function returns -EINVAL if the pulse violates the state machine |
144 | */ | 144 | */ |
145 | static int handle_event(struct input_dev *input_dev, | 145 | static int ir_rc5_decode(struct input_dev *input_dev, |
146 | struct ir_raw_event *ev) | 146 | struct ir_raw_event *ev) |
147 | { | 147 | { |
148 | struct decoder_data *data; | 148 | struct decoder_data *data; |
@@ -273,32 +273,6 @@ err2: | |||
273 | return -EINVAL; | 273 | return -EINVAL; |
274 | } | 274 | } |
275 | 275 | ||
276 | /** | ||
277 | * ir_rc5_decode() - Decodes all RC-5 pulsecodes on a given array | ||
278 | * @input_dev: the struct input_dev descriptor of the device | ||
279 | * @evs: event array with type/duration of pulse/space | ||
280 | * @len: length of the array | ||
281 | * This function returns the number of decoded pulses | ||
282 | */ | ||
283 | static int ir_rc5_decode(struct input_dev *input_dev, | ||
284 | struct ir_raw_event *evs, | ||
285 | int len) | ||
286 | { | ||
287 | struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); | ||
288 | struct decoder_data *data; | ||
289 | int pos = 0; | ||
290 | int rc = 0; | ||
291 | |||
292 | data = get_decoder_data(ir_dev); | ||
293 | if (!data || !data->enabled) | ||
294 | return 0; | ||
295 | |||
296 | for (pos = 0; pos < len; pos++) | ||
297 | handle_event(input_dev, &evs[pos]); | ||
298 | |||
299 | return rc; | ||
300 | } | ||
301 | |||
302 | static int ir_rc5_register(struct input_dev *input_dev) | 276 | static int ir_rc5_register(struct input_dev *input_dev) |
303 | { | 277 | { |
304 | struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); | 278 | struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); |