Re: [PATCH v1] extcon: max14577: Use named initializers for the platform_device_id array
From: Chanwoo Choi
Date: Fri Nov 27 2026 - 17:39:30 EST
On 6/16/2026 11:31 PM, Uwe Kleine-König (The Capable Hub) wrote:
> Named initializers are better readable and more robust to changes of the
> struct definition. This robustness is relevant for a planned change to
> struct platform_device_id replacing .driver_data by an anonymous union.
>
> While touching this array drop commas before closing curly braces on the
> same line.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
> ---
> drivers/extcon/extcon-max14577.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c
> index 5476f48ed74b..2c1580ebfc61 100644
> --- a/drivers/extcon/extcon-max14577.c
> +++ b/drivers/extcon/extcon-max14577.c
> @@ -771,8 +771,8 @@ static int max14577_muic_probe(struct platform_device *pdev)
> }
>
> static const struct platform_device_id max14577_muic_id[] = {
> - { "max14577-muic", MAXIM_DEVICE_TYPE_MAX14577, },
> - { "max77836-muic", MAXIM_DEVICE_TYPE_MAX77836, },
> + { .name = "max14577-muic", .driver_data = MAXIM_DEVICE_TYPE_MAX14577 },
> + { .name = "max77836-muic", .driver_data = MAXIM_DEVICE_TYPE_MAX77836 },
> { }
> };
> MODULE_DEVICE_TABLE(platform, max14577_muic_id);
>
> base-commit: 8d6dbbbe3ba62de0a63e962ee004afb848c8e3ac
Applied it. Thanks.
--
Best Regards,
Chanwoo Choi
Principal Engineer, Samsung Electronics