Re: [PATCH v1 1/2] hwmon: Drop unused i2c driver_data

From: Chris Packham

Date: Wed May 13 2026 - 18:41:25 EST


Hi Uwe,

On 14/05/2026 04:44, Uwe Kleine-König (The Capable Hub) wrote:
> The four drivers all don't make use of the value that was explicitly
> assigned to the .driver_data member. Drop the assignment.
>
> While touching these lines also make the assignments use named
> initializers and drop a comma after the end-of-list marker.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
Reviewed-by: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx> # For
APS-379
> ---
> drivers/hwmon/lm80.c | 4 ++--
> drivers/hwmon/pmbus/aps-379.c | 4 ++--
> drivers/hwmon/pmbus/lt3074.c | 4 ++--
> drivers/hwmon/tsc1641.c | 2 +-
> 4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c
> index 63c7831bd3e1..002c669182e1 100644
> --- a/drivers/hwmon/lm80.c
> +++ b/drivers/hwmon/lm80.c
> @@ -622,8 +622,8 @@ static int lm80_probe(struct i2c_client *client)
> */
>
> static const struct i2c_device_id lm80_id[] = {
> - { "lm80", 0 },
> - { "lm96080", 1 },
> + { "lm80" },
> + { "lm96080" },
> { }
> };
> MODULE_DEVICE_TABLE(i2c, lm80_id);
> diff --git a/drivers/hwmon/pmbus/aps-379.c b/drivers/hwmon/pmbus/aps-379.c
> index 7d46cd647e20..3ec0940ae564 100644
> --- a/drivers/hwmon/pmbus/aps-379.c
> +++ b/drivers/hwmon/pmbus/aps-379.c
> @@ -100,8 +100,8 @@ static struct pmbus_driver_info aps_379_info = {
> };
>
> static const struct i2c_device_id aps_379_id[] = {
> - { "aps-379", 0 },
> - {},
> + { .name = "aps-379" },
> + { }
> };
> MODULE_DEVICE_TABLE(i2c, aps_379_id);
>
> diff --git a/drivers/hwmon/pmbus/lt3074.c b/drivers/hwmon/pmbus/lt3074.c
> index 3704dbe7b54a..ed932ddb4f77 100644
> --- a/drivers/hwmon/pmbus/lt3074.c
> +++ b/drivers/hwmon/pmbus/lt3074.c
> @@ -95,8 +95,8 @@ static int lt3074_probe(struct i2c_client *client)
> }
>
> static const struct i2c_device_id lt3074_id[] = {
> - { "lt3074", 0 },
> - {}
> + { .name = "lt3074" },
> + { }
> };
> MODULE_DEVICE_TABLE(i2c, lt3074_id);
>
> diff --git a/drivers/hwmon/tsc1641.c b/drivers/hwmon/tsc1641.c
> index 2b5d34bab146..fc53cd5bb6e0 100644
> --- a/drivers/hwmon/tsc1641.c
> +++ b/drivers/hwmon/tsc1641.c
> @@ -721,7 +721,7 @@ static int tsc1641_probe(struct i2c_client *client)
> }
>
> static const struct i2c_device_id tsc1641_id[] = {
> - { "tsc1641", 0 },
> + { .name = "tsc1641" },
> { }
> };
> MODULE_DEVICE_TABLE(i2c, tsc1641_id);