Skip to content

Commit bb5eace

Browse files
andy-shevlinusw
authored andcommitted
pinctrl: mediatek: 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 383da0c commit bb5eace

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

drivers/pinctrl/mediatek/pinctrl-moore.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
.funcs = NULL, \
3838
}
3939

40-
#define PINCTRL_PIN_GROUP(name, id) \
41-
{ \
42-
name, \
43-
id##_pins, \
44-
ARRAY_SIZE(id##_pins), \
45-
id##_funcs, \
40+
#define PINCTRL_PIN_GROUP(_name_, id) \
41+
{ \
42+
.name = _name_, \
43+
.pins = id##_pins, \
44+
.num_pins = ARRAY_SIZE(id##_pins), \
45+
.data = id##_funcs, \
4646
}
4747

4848
int mtk_moore_pinctrl_probe(struct platform_device *pdev,

drivers/pinctrl/mediatek/pinctrl-paris.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
__VA_ARGS__, { } }, \
5050
}
5151

52-
#define PINCTRL_PIN_GROUP(name, id) \
53-
{ \
54-
name, \
55-
id##_pins, \
56-
ARRAY_SIZE(id##_pins), \
57-
id##_funcs, \
52+
#define PINCTRL_PIN_GROUP(_name_, id) \
53+
{ \
54+
.name = _name_, \
55+
.pins = id##_pins, \
56+
.num_pins = ARRAY_SIZE(id##_pins), \
57+
.data = id##_funcs, \
5858
}
5959

6060
int mtk_paris_pinctrl_probe(struct platform_device *pdev);

0 commit comments

Comments
 (0)