summaryrefslogtreecommitdiff
path: root/drivers/media/common
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2018-08-21 22:57:52 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-10-04 21:22:27 +0300
commit183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871 (patch)
tree590ad6faa92cfc230d2a3527f585d7f4d728c217 /drivers/media/common
parentc5f14af0d8b63a62dfde7ade372da0038507deeb (diff)
downloadlinux-183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871.tar.xz
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/common')
-rw-r--r--drivers/media/common/siano/smsir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/common/siano/smsir.c b/drivers/media/common/siano/smsir.c
index a1cfafba9b4c..79bd627f84b8 100644
--- a/drivers/media/common/siano/smsir.c
+++ b/drivers/media/common/siano/smsir.c
@@ -26,10 +26,10 @@ 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++) {
- DEFINE_IR_RAW_EVENT(ev);
-
- ev.duration = abs(samples[i]) * 1000; /* Convert to ns */
- ev.pulse = (samples[i] > 0) ? false : true;
+ struct ir_raw_event ev = {
+ .duration = abs(samples[i]) * 1000, /* Convert to ns */
+ .pulse = (samples[i] > 0) ? false : true
+ };
ir_raw_event_store(coredev->ir.dev, &ev);
}