| Message ID | 20260918-acpi-i2c-v1-1-caf4bea4886c@thegoodpenguin.co.uk |
|---|---|
| State | Accepted |
| Delegated to: | Andi Shyti |
| Headers | show |
| Series | i2c: use designated initializers for acpi_device_id | expand |
On Fri, Sep 18, 2026 at 02:01:50PM +0100, Pawel Zalewski wrote: > Use a designated initializer for the acpi_device_id fields which makes the > code more readable and consistent with how lists are initialized in the > rest of the kernel code base. Also drop explicitly setting fields to 0 > where it is redundant. > > Unify the list terminator to have a single space between the brackets and > no trailing comma. > > Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> Acked-by: Mika Westerberg <westeri@kernel.org>
On Fri, Sep 18, 2026 at 02:01:50PM +0100, Pawel Zalewski wrote: > Use a designated initializer for the acpi_device_id fields which makes the > code more readable and consistent with how lists are initialized in the > rest of the kernel code base. Also drop explicitly setting fields to 0 > where it is redundant. > > Unify the list terminator to have a single space between the brackets and > no trailing comma. > > Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> > --- > drivers/i2c/i2c-core-acpi.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) Reviewed-by: Thierry Reding <treding@nvidia.com>
On Tue, Oct 13, 2026 at 05:48:58PM +0200, Thierry Reding wrote: > On Fri, Sep 18, 2026 at 02:01:50PM +0100, Pawel Zalewski wrote: > > Use a designated initializer for the acpi_device_id fields which makes the > > code more readable and consistent with how lists are initialized in the > > rest of the kernel code base. Also drop explicitly setting fields to 0 > > where it is redundant. > > > > Unify the list terminator to have a single space between the brackets and > > no trailing comma. > > > > Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> > > --- > > drivers/i2c/i2c-core-acpi.c | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > Reviewed-by: Thierry Reding <treding@nvidia.com> Nevermind, I realized too late that this popped up in my inbox because of Andi's message saying the patches were applied. Thierry
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c index 8f3bdd50186e..5161e8a7ca10 100644 --- a/drivers/i2c/i2c-core-acpi.c +++ b/drivers/i2c/i2c-core-acpi.c @@ -352,8 +352,8 @@ static const struct acpi_device_id i2c_acpi_force_400khz_device_ids[] = { * at 400KHz (as can be expected of any recent i2c hw) so we force * the speed of the bus to 400 KHz if a Silead device is present. */ - { "MSSL1680", 0 }, - {} + { .id = "MSSL1680" }, + { } }; static const struct acpi_device_id i2c_acpi_force_100khz_device_ids[] = { @@ -371,11 +371,11 @@ static const struct acpi_device_id i2c_acpi_force_100khz_device_ids[] = { * the device works without issues on Windows at what is expected to be * a 400KHz frequency. The root cause of the issue is not known. */ - { "DLL0945", 0 }, - { "ELAN0678", 0 }, - { "ELAN06FA", 0 }, - { "ELAN1300", 0 }, - {} + { .id = "DLL0945" }, + { .id = "ELAN0678" }, + { .id = "ELAN06FA" }, + { .id = "ELAN1300" }, + { } }; static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
Use a designated initializer for the acpi_device_id fields which makes the code more readable and consistent with how lists are initialized in the rest of the kernel code base. Also drop explicitly setting fields to 0 where it is redundant. Unify the list terminator to have a single space between the brackets and no trailing comma. Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> --- drivers/i2c/i2c-core-acpi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)