Re: [PATCH v1] mfd: Use named initializers for arrays of i2c_device_data

From: Uwe Kleine-König (The Capable Hub)

Date: Sat May 16 2026 - 02:12:20 EST


On Fri, May 15, 2026 at 11:58:39AM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
> index 6a7b7a697fb7..fb23d5ed1f26 100644
> --- a/drivers/mfd/tps65910.c
> +++ b/drivers/mfd/tps65910.c
> @@ -518,8 +518,8 @@ static int tps65910_i2c_probe(struct i2c_client *i2c)
> }
>
> static const struct i2c_device_id tps65910_i2c_id[] = {
> - { "tps65910", TPS65910 },
> - { "tps65911", TPS65911 },
> + { .name = "tps65910", .driver_data = TPS65910 },
> + { .name = "tps65911", .driver_data = TPS65911 },
> { }
> };
>

The indention in this hunk uses spaces instead of tabs (both with and
without my patch). I fixed that in my tree, so if it comes to a v2 the
indention will be fixed there.

> [...]
> diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c
> index 8ecfe878a5ba..1c0ba450ef9b 100644
> --- a/drivers/mfd/wm8400-core.c
> +++ b/drivers/mfd/wm8400-core.c
> @@ -135,7 +135,7 @@ static int wm8400_i2c_probe(struct i2c_client *i2c)
> }
>
> static const struct i2c_device_id wm8400_i2c_id[] = {
> - { "wm8400" },
> + { .name = "wm8400" },
> { }
> };
>

ditto.

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature