Few drivers still have assumption that ir_raw_event
consists of duration and pulse flag.
Fix that.

Signed-off-by: Maxim Levitsky <maximlevit...@gmail.com>
---
 drivers/media/dvb/siano/smsir.c          |    2 +-
 drivers/media/video/cx23885/cx23888-ir.c |    1 +
 drivers/media/video/cx25840/cx25840-ir.c |    1 +
 3 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/siano/smsir.c b/drivers/media/dvb/siano/smsir.c
index d0e4639..a27c44a 100644
--- a/drivers/media/dvb/siano/smsir.c
+++ b/drivers/media/dvb/siano/smsir.c
@@ -40,7 +40,7 @@ void sms_ir_event(struct smscore_device_t *coredev, const 
char *buf, int len)
        const s32 *samples = (const void *)buf;
 
        for (i = 0; i < len >> 2; i++) {
-               struct ir_raw_event ev;
+               DEFINE_IR_RAW_EVENT(ev);
 
                ev.duration = abs(samples[i]) * 1000; /* Convert to ns */
                ev.pulse = (samples[i] > 0) ? false : true;
diff --git a/drivers/media/video/cx23885/cx23888-ir.c 
b/drivers/media/video/cx23885/cx23888-ir.c
index 2502a0a..e78e3e4 100644
--- a/drivers/media/video/cx23885/cx23888-ir.c
+++ b/drivers/media/video/cx23885/cx23888-ir.c
@@ -704,6 +704,7 @@ static int cx23888_ir_rx_read(struct v4l2_subdev *sd, u8 
*buf, size_t count,
                if (v > IR_MAX_DURATION)
                        v = IR_MAX_DURATION;
 
+               init_ir_raw_event(&p->ir_core_data);
                p->ir_core_data.pulse = u;
                p->ir_core_data.duration = v;
 
diff --git a/drivers/media/video/cx25840/cx25840-ir.c 
b/drivers/media/video/cx25840/cx25840-ir.c
index c2b4c14..97a4e9b 100644
--- a/drivers/media/video/cx25840/cx25840-ir.c
+++ b/drivers/media/video/cx25840/cx25840-ir.c
@@ -706,6 +706,7 @@ static int cx25840_ir_rx_read(struct v4l2_subdev *sd, u8 
*buf, size_t count,
                if (v > IR_MAX_DURATION)
                        v = IR_MAX_DURATION;
 
+               init_ir_raw_event(&p->ir_core_data);
                p->ir_core_data.pulse = u;
                p->ir_core_data.duration = v;
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to