[PATCH] [media] cec: Fix anonymous union initialization with older toolchains.

DORMANTno replies

From: Vinson Lee <hidden>
Date: 2016-07-09 20:16:41
Subsystem: media input infrastructure (v4l/dvb), staging subsystem, the rest · Maintainers: Mauro Carvalho Chehab, Greg Kroah-Hartman, Linus Torvalds

This patch fixes this build error on CentOS 6.8 with GCC 4.4.7.

  CC [M]  drivers/staging/media/cec/cec-adap.o
drivers/staging/media/cec/cec-adap.c: In function ‘cec_queue_msg_fh’:
drivers/staging/media/cec/cec-adap.c:141: error: unknown field ‘lost_msgs’ specified in initializer

Fixes: 9881fe0ca187 ("[media] cec: add HDMI CEC framework (adapter)")
Signed-off-by: Vinson Lee <redacted>
---
 drivers/staging/media/cec/cec-adap.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/media/cec/cec-adap.c b/drivers/staging/media/cec/cec-adap.c
index 5ffa839..a21c13d 100644
--- a/drivers/staging/media/cec/cec-adap.c
+++ b/drivers/staging/media/cec/cec-adap.c
@@ -137,8 +137,10 @@ static void cec_queue_event(struct cec_adapter *adap,
 static void cec_queue_msg_fh(struct cec_fh *fh, const struct cec_msg *msg)
 {
 	static const struct cec_event ev_lost_msg = {
+		.ts = 0,
 		.event = CEC_EVENT_LOST_MSGS,
-		.lost_msgs.lost_msgs = 1,
+		.flags = 0,
+		{ .lost_msgs = { .lost_msgs = 1 } },
 	};
 	struct cec_msg_entry *entry;
 
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help