diff options
author | Sean Young <sean@mess.org> | 2018-08-21 15:57:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-10-04 14:22:27 -0400 |
commit | 183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871 (patch) | |
tree | 590ad6faa92cfc230d2a3527f585d7f4d728c217 /drivers/media/pci/cx88 | |
parent | c5f14af0d8b63a62dfde7ade372da0038507deeb (diff) |
media: rc: Remove init_ir_raw_event and DEFINE_IR_RAW_EVENT macros
This can be done with c99 initializers, which makes the code cleaner
and more transparent. It does require gcc 4.6, because of this bug
in earlier versions:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676
Since commit cafa0010cd51 ("Raise the minimum required gcc version to
4.6"), this is the case.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/pci/cx88')
-rw-r--r-- | drivers/media/pci/cx88/cx88-input.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/pci/cx88/cx88-input.c b/drivers/media/pci/cx88/cx88-input.c index c5cee71d744d..ca76da04b476 100644 --- a/drivers/media/pci/cx88/cx88-input.c +++ b/drivers/media/pci/cx88/cx88-input.c | |||
@@ -535,7 +535,7 @@ void cx88_ir_irq(struct cx88_core *core) | |||
535 | struct cx88_IR *ir = core->ir; | 535 | struct cx88_IR *ir = core->ir; |
536 | u32 samples; | 536 | u32 samples; |
537 | unsigned int todo, bits; | 537 | unsigned int todo, bits; |
538 | struct ir_raw_event ev; | 538 | struct ir_raw_event ev = {}; |
539 | 539 | ||
540 | if (!ir || !ir->sampling) | 540 | if (!ir || !ir->sampling) |
541 | return; | 541 | return; |
@@ -550,7 +550,6 @@ void cx88_ir_irq(struct cx88_core *core) | |||
550 | if (samples == 0xff && ir->dev->idle) | 550 | if (samples == 0xff && ir->dev->idle) |
551 | return; | 551 | return; |
552 | 552 | ||
553 | init_ir_raw_event(&ev); | ||
554 | for (todo = 32; todo > 0; todo -= bits) { | 553 | for (todo = 32; todo > 0; todo -= bits) { |
555 | ev.pulse = samples & 0x80000000 ? false : true; | 554 | ev.pulse = samples & 0x80000000 ? false : true; |
556 | bits = min(todo, 32U - fls(ev.pulse ? samples : ~samples)); | 555 | bits = min(todo, 32U - fls(ev.pulse ? samples : ~samples)); |