Re: [PATCH v2 07/14] iio: adc: stm32-adc: add support for stm32mp25
From: Andy Shevchenko
Date: Wed Sep 30 2026 - 04:57:17 EST
On Wed, Sep 30, 2026 at 10:44:12AM +0200, Fabrice Gasnier wrote:
> On 9/30/26 10:33, Andy Shevchenko wrote:
...
> Sorry if I'm a bit confused :-), just to be sure, the preferred style should be as below ?
Yes, in case if you want to update the whole ID table.
> static const struct of_device_id stm32_adc_of_match[] = {
> { .compatible = "st,stm32f4-adc-core", .data = (void *)&stm32f4_adc_priv_cfg },
> { .compatible = "st,stm32h7-adc-core", .data = (void *)&stm32h7_adc_priv_cfg },
> { .compatible = "st,stm32mp1-adc-core", .data = (void *)&stm32mp1_adc_priv_cfg },
> { .compatible = "st,stm32mp13-adc-core", .data = (void *)&stm32mp13_adc_priv_cfg },
> { }
> };
The rationale for the trailing comma is:
1) no need (doesn't make sense) to have it on a terminator entry;
2) do add it for non-terminator entry to avoid a churn in the future;
3) do not add it for any case when the whole array is located on a single line.
--
With Best Regards,
Andy Shevchenko