summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-ingenic.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-12-11 21:57:56 +0300
committerLinus Walleij <linus.walleij@linaro.org>2023-12-12 02:47:52 +0300
commitb0f24e021d58d74b83857b9d5c468bcda3785572 (patch)
tree27c7cbbacb159220cd102b5acdfd6a9d5f8332f8 /drivers/pinctrl/pinctrl-ingenic.c
parentbb5eace1562fcef3c7ac9d0bd3e01af1187e46d0 (diff)
downloadlinux-b0f24e021d58d74b83857b9d5c468bcda3785572.tar.xz
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 <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20231211190321.307330-4-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-ingenic.c')
-rw-r--r--drivers/pinctrl/pinctrl-ingenic.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
index ee718f6e2556..f5661dcdedf5 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -82,16 +82,21 @@
#define PINS_PER_GPIO_CHIP 32
#define JZ4730_PINS_PER_PAIRED_REG 16
-#define INGENIC_PIN_GROUP_FUNCS(name, id, funcs) \
- { \
- name, \
- id##_pins, \
- ARRAY_SIZE(id##_pins), \
- funcs, \
+#define INGENIC_PIN_GROUP_FUNCS(_name_, id, funcs) \
+ { \
+ .name = _name_, \
+ .pins = id##_pins, \
+ .num_pins = ARRAY_SIZE(id##_pins), \
+ .data = funcs, \
}
-#define INGENIC_PIN_GROUP(name, id, func) \
- INGENIC_PIN_GROUP_FUNCS(name, id, (void *)(func))
+#define INGENIC_PIN_GROUP(_name_, id, func) \
+ { \
+ .name = _name_, \
+ .pins = id##_pins, \
+ .num_pins = ARRAY_SIZE(id##_pins), \
+ .data = (void *)func, \
+ }
enum jz_version {
ID_JZ4730,