summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2018-08-21 15:57:52 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-10-04 14:22:27 -0400
commit183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871 (patch)
tree590ad6faa92cfc230d2a3527f585d7f4d728c217 /include/media
parentc5f14af0d8b63a62dfde7ade372da0038507deeb (diff)
downloadlinux-183e19f5b9ee18fc7bc4b3983a91b5d0dd6c7871.tar.bz2
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 'include/media')
-rw-r--r--include/media/rc-core.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index 61571773a98d..c0cfbe16a854 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -317,13 +317,6 @@ struct ir_raw_event {
unsigned carrier_report:1;
};
-#define DEFINE_IR_RAW_EVENT(event) struct ir_raw_event event = {}
-
-static inline void init_ir_raw_event(struct ir_raw_event *ev)
-{
- memset(ev, 0, sizeof(*ev));
-}
-
#define IR_DEFAULT_TIMEOUT MS_TO_NS(125)
#define IR_MAX_DURATION 500000000 /* 500 ms */
#define US_TO_NS(usec) ((usec) * 1000)
@@ -344,9 +337,7 @@ int ir_raw_encode_carrier(enum rc_proto protocol);
static inline void ir_raw_event_reset(struct rc_dev *dev)
{
- struct ir_raw_event ev = { .reset = true };
-
- ir_raw_event_store(dev, &ev);
+ ir_raw_event_store(dev, &((struct ir_raw_event) { .reset = true }));
dev->idle = true;
ir_raw_event_handle(dev);
}