From c02e0d12a9a0a913dee5efd695603b73ee4b729a Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sun, 1 Aug 2010 02:18:13 -0300 Subject: V4L/DVB: cx23885, cx25840: Change IR measurment records to use struct ir_raw_event The CX23885 and CX25840 modules were using their own simple IR pulse width measurement record type which required conversion when passing to the new IR core. This change makes that record type consistent with the new IR core and removes a data conversion. Signed-off-by: Andy Walls Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx23885/cx23885-input.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'drivers/media/video/cx23885/cx23885-input.c') diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c index 252817acc35b..bb61870b8d6e 100644 --- a/drivers/media/video/cx23885/cx23885-input.c +++ b/drivers/media/video/cx23885/cx23885-input.c @@ -44,34 +44,26 @@ #define MODULE_NAME "cx23885" -static void convert_measurement(u32 x, struct ir_raw_event *y) -{ - y->pulse = (x & V4L2_SUBDEV_IR_PULSE_LEVEL_MASK) ? true : false; - y->duration = x & V4L2_SUBDEV_IR_PULSE_MAX_WIDTH_NS; -} - static void cx23885_input_process_measurements(struct cx23885_dev *dev, bool overrun) { struct cx23885_kernel_ir *kernel_ir = dev->kernel_ir; - struct ir_raw_event kernel_ir_event; - u32 sd_ir_data[64]; ssize_t num; int count, i; bool handle = false; + struct ir_raw_event ir_core_event[64]; do { num = 0; - v4l2_subdev_call(dev->sd_ir, ir, rx_read, (u8 *) sd_ir_data, - sizeof(sd_ir_data), &num); + v4l2_subdev_call(dev->sd_ir, ir, rx_read, (u8 *) ir_core_event, + sizeof(ir_core_event), &num); - count = num / sizeof(u32); + count = num / sizeof(struct ir_raw_event); for (i = 0; i < count; i++) { - convert_measurement(sd_ir_data[i], &kernel_ir_event); ir_raw_event_store(kernel_ir->inp_dev, - &kernel_ir_event); + &ir_core_event[i]); handle = true; } } while (num != 0); -- cgit v1.2.3-55-g7522