Skip to content

Commit

Permalink
drivers/pinctrl/intel/pinctrl-baytrail.c: fix build with gcc-4.4
Browse files Browse the repository at this point in the history
gcc-4.4 and thereabouts has issues with initializers of anonymous
unions, and it generates the following warnings:

  drivers/pinctrl/intel/pinctrl-baytrail.c:413: error: unknown field 'simple_funcs' specified in initializer
  drivers/pinctrl/intel/pinctrl-baytrail.c:413: warning: missing braces around initializer
  drivers/pinctrl/intel/pinctrl-baytrail.c:413: warning: (near initialization for 'byt_score_groups[0].<anonymous>')
  drivers/pinctrl/intel/pinctrl-baytrail.c:415: error: unknown field 'simple_funcs' specified in initializer
  drivers/pinctrl/intel/pinctrl-baytrail.c:417: error: unknown field 'simple_funcs' specified in initializer
  ...

Work around this.

Acked-by: Mika Westerberg <[email protected]>
Cc: Heikki Krogerus <[email protected]>
Cc: Linus Walleij <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed May 26, 2016
1 parent 4abaac9 commit bbccb9c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/pinctrl/intel/pinctrl-baytrail.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ struct byt_community {
.name = (n), \
.pins = (p), \
.npins = ARRAY_SIZE((p)), \
.has_simple_funcs = 1, \
.simple_funcs = (f), \
.has_simple_funcs = 1, \
{ \
.simple_funcs = (f), \
}, \
.nfuncs = ARRAY_SIZE((f)), \
}
#define PIN_GROUP_MIXED(n, p, f) \
Expand All @@ -163,7 +165,9 @@ struct byt_community {
.pins = (p), \
.npins = ARRAY_SIZE((p)), \
.has_simple_funcs = 0, \
.mixed_funcs = (f), \
{ \
.mixed_funcs = (f), \
}, \
.nfuncs = ARRAY_SIZE((f)), \
}

Expand Down

0 comments on commit bbccb9c

Please sign in to comment.