Skip to content

Commit b0f24e0

Browse files
andy-shevlinusw
authored andcommitted
pinctrl: ingenic: Use C99 initializers in PINCTRL_PIN_GROUP()
For the better flexibility use C99 initializers in PINCTRL_PIN_GROUP(). Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent bb5eace commit b0f24e0

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

drivers/pinctrl/pinctrl-ingenic.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,21 @@
8282
#define PINS_PER_GPIO_CHIP 32
8383
#define JZ4730_PINS_PER_PAIRED_REG 16
8484

85-
#define INGENIC_PIN_GROUP_FUNCS(name, id, funcs) \
86-
{ \
87-
name, \
88-
id##_pins, \
89-
ARRAY_SIZE(id##_pins), \
90-
funcs, \
85+
#define INGENIC_PIN_GROUP_FUNCS(_name_, id, funcs) \
86+
{ \
87+
.name = _name_, \
88+
.pins = id##_pins, \
89+
.num_pins = ARRAY_SIZE(id##_pins), \
90+
.data = funcs, \
9191
}
9292

93-
#define INGENIC_PIN_GROUP(name, id, func) \
94-
INGENIC_PIN_GROUP_FUNCS(name, id, (void *)(func))
93+
#define INGENIC_PIN_GROUP(_name_, id, func) \
94+
{ \
95+
.name = _name_, \
96+
.pins = id##_pins, \
97+
.num_pins = ARRAY_SIZE(id##_pins), \
98+
.data = (void *)func, \
99+
}
95100

96101
enum jz_version {
97102
ID_JZ4730,

0 commit comments

Comments
 (0)