diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2010-10-24 22:05:29 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-25 16:54:28 -0400 |
commit | dc69798447173a6b711fe36b714892dd2e880297 (patch) | |
tree | c9b16c9dd97b95075800ce6d5fa187d58a5671ff /drivers/media | |
parent | 910f5f05f99c1ffbb484c4e6eb2a460e7a08e2d7 (diff) |
[media] IR: initialize ir_raw_event in few more drivers
Few drivers still have assumption that ir_raw_event
consists of duration and pulse flag.
Fix that.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/siano/smsir.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23888-ir.c | 1 | ||||
-rw-r--r-- | 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 d0e4639ee9db..a27c44a8af5a 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) | |||
40 | const s32 *samples = (const void *)buf; | 40 | const s32 *samples = (const void *)buf; |
41 | 41 | ||
42 | for (i = 0; i < len >> 2; i++) { | 42 | for (i = 0; i < len >> 2; i++) { |
43 | struct ir_raw_event ev; | 43 | DEFINE_IR_RAW_EVENT(ev); |
44 | 44 | ||
45 | ev.duration = abs(samples[i]) * 1000; /* Convert to ns */ | 45 | ev.duration = abs(samples[i]) * 1000; /* Convert to ns */ |
46 | ev.pulse = (samples[i] > 0) ? false : true; | 46 | 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 2502a0a67097..e78e3e4c8112 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, | |||
704 | if (v > IR_MAX_DURATION) | 704 | if (v > IR_MAX_DURATION) |
705 | v = IR_MAX_DURATION; | 705 | v = IR_MAX_DURATION; |
706 | 706 | ||
707 | init_ir_raw_event(&p->ir_core_data); | ||
707 | p->ir_core_data.pulse = u; | 708 | p->ir_core_data.pulse = u; |
708 | p->ir_core_data.duration = v; | 709 | p->ir_core_data.duration = v; |
709 | 710 | ||
diff --git a/drivers/media/video/cx25840/cx25840-ir.c b/drivers/media/video/cx25840/cx25840-ir.c index c2b4c14dc9ab..97a4e9b25fe4 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, | |||
706 | if (v > IR_MAX_DURATION) | 706 | if (v > IR_MAX_DURATION) |
707 | v = IR_MAX_DURATION; | 707 | v = IR_MAX_DURATION; |
708 | 708 | ||
709 | init_ir_raw_event(&p->ir_core_data); | ||
709 | p->ir_core_data.pulse = u; | 710 | p->ir_core_data.pulse = u; |
710 | p->ir_core_data.duration = v; | 711 | p->ir_core_data.duration = v; |
711 | 712 | ||