From 8522944085ffd83af129ffce06e3a9f34635391c Mon Sep 17 00:00:00 2001 From: David Rientjes Date: Tue, 20 Mar 2012 09:53:05 +0100 Subject: drivers, samsung-laptop: fix initialization of sabi_data in sabi_set_commandb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fields d0, d1, d2, and d3 are members of an anonymous struct inside an anonymous union inside struct sabi_data. Initialization must be done by wrapping the anonymous union and structs with brackets to avoid a build error: drivers/platform/x86/samsung-laptop.c: In function ‘sabi_set_commandb’: drivers/platform/x86/samsung-laptop.c:433: error: unknown field ‘d0’ specified in initializer drivers/platform/x86/samsung-laptop.c:433: warning: missing braces around initializer drivers/platform/x86/samsung-laptop.c:433: warning: (near initialization for ‘in.’) ... Signed-off-by: David Rientjes Signed-off-by: Corentin Chary Signed-off-by: Matthew Garrett --- drivers/platform/x86/samsung-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/platform') diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 7d7109fdbd6..b7c67c87f47 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -430,7 +430,7 @@ exit: static int sabi_set_commandb(struct samsung_laptop *samsung, u16 command, u8 data) { - struct sabi_data in = { .d0 = 0, .d1 = 0, .d2 = 0, .d3 = 0 }; + struct sabi_data in = { { { .d0 = 0, .d1 = 0, .d2 = 0, .d3 = 0 } } }; in.data[0] = data; return sabi_command(samsung, command, &in, NULL); -- cgit v1.2.3-70-g09d2