]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/x86: int3472: Convert int3472_gpio_map to use C99 initializers
authorHans de Goede <hansg@kernel.org>
Fri, 25 Jul 2025 21:52:57 +0000 (23:52 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 19 Aug 2025 08:37:42 +0000 (11:37 +0300)
Convert int3472_gpio_map to use C99 initializers to make it clearer which
struct field is set to which value.

Suggested-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hansg@kernel.org>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20250725215259.402796-2-hansg@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/int3472/discrete.c

index 4c0aed6e626f6bb3c213e67aea67765d507cad5d..f3e7e0ab7fad3dffc0bf60aaf9f471c30d6b7a19 100644 (file)
@@ -142,10 +142,18 @@ struct int3472_gpio_map {
 };
 
 static const struct int3472_gpio_map int3472_gpio_map[] = {
-       /* mt9m114 designs declare a powerdown pin which controls the regulators */
-       { "INT33F0", INT3472_GPIO_TYPE_POWERDOWN, INT3472_GPIO_TYPE_POWER_ENABLE, false, "vdd" },
-       /* ov7251 driver / DT-bindings expect "enable" as con_id for reset */
-       { "INT347E", INT3472_GPIO_TYPE_RESET, INT3472_GPIO_TYPE_RESET, false, "enable" },
+       {       /* mt9m114 designs declare a powerdown pin which controls the regulators */
+               .hid = "INT33F0",
+               .type_from = INT3472_GPIO_TYPE_POWERDOWN,
+               .type_to = INT3472_GPIO_TYPE_POWER_ENABLE,
+               .con_id = "vdd",
+       },
+       {       /* ov7251 driver / DT-bindings expect "enable" as con_id for reset */
+               .hid = "INT347E",
+               .type_from = INT3472_GPIO_TYPE_RESET,
+               .type_to = INT3472_GPIO_TYPE_RESET,
+               .con_id = "enable",
+       },
 };
 
 static void int3472_get_con_id_and_polarity(struct int3472_discrete_device *int3472, u8 *type,