aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2012-03-20 04:53:05 -0400
committerMatthew Garrett <mjg@redhat.com>2012-03-26 15:05:36 -0400
commit8522944085ffd83af129ffce06e3a9f34635391c (patch)
tree21259b6fa4d80c6939f52dd330673db74b0e1b94 /drivers/platform
parentc09b2237da24e9136fc8053e11244f52903e73e0 (diff)
drivers, samsung-laptop: fix initialization of sabi_data in sabi_set_commandb
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.<anonymous>’) ... Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/samsung-laptop.c2
1 files changed, 1 insertions, 1 deletions
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:
430static int sabi_set_commandb(struct samsung_laptop *samsung, 430static int sabi_set_commandb(struct samsung_laptop *samsung,
431 u16 command, u8 data) 431 u16 command, u8 data)
432{ 432{
433 struct sabi_data in = { .d0 = 0, .d1 = 0, .d2 = 0, .d3 = 0 }; 433 struct sabi_data in = { { { .d0 = 0, .d1 = 0, .d2 = 0, .d3 = 0 } } };
434 434
435 in.data[0] = data; 435 in.data[0] = data;
436 return sabi_command(samsung, command, &in, NULL); 436 return sabi_command(samsung, command, &in, NULL);