[PATCH v1 2/2] ASoC: Use named initializers for arrays of i2c_device_data

Uwe Kleine-König (The Capable Hub) u.kleine-koenig at baylibre.com
Fri May 15 23:20:24 PDT 2026


Hello,

On Wed, May 13, 2026 at 07:23:04PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
> index 9f40ca4b60d5..df438baf05dc 100644
> --- a/sound/soc/codecs/max98088.c
> +++ b/sound/soc/codecs/max98088.c
> @@ -1722,8 +1722,8 @@ static const struct snd_soc_component_driver soc_component_dev_max98088 = {
>  };
>  
>  static const struct i2c_device_id max98088_i2c_id[] = {
> -       { "max98088", MAX98088 },
> -       { "max98089", MAX98089 },
> +       { .name = "max98088", .driver_data = MAX98088 },
> +       { .name = "max98089", .driver_data = MAX98089 },
>         { }
>  };
>  MODULE_DEVICE_TABLE(i2c, max98088_i2c_id);

The indention is wrong here and uses spaces instead of tabs (with and
without my patch). I squashed a change to tabs into my local commit, so
this will be addressed in a v2 if it comes to that.

However we have:

	uwe at monoceros:~/gsrc/linux$ grep '^      ' sound/soc/codecs/max98088.c | wc -l
	911
	uwe at monoceros:~/gsrc/linux$ wc -l sound/soc/codecs/max98088.c
	1780 sound/soc/codecs/max98088.c

so it is probably more sensible to address all these lines in a separate
patch.

Best regards
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20260516/ae9337da/attachment-0001.sig>


More information about the Linux-mediatek mailing list