[PATCH 11/12] iio: proximity: use named initializers for acpi_device_id

From: Pawel Zalewski

Date: Mon Oct 05 2026 - 10:10:22 EST


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.

Signed-off-by: Pawel Zalewski <pzalewski@xxxxxxxxxxxxxxxxxxxx>
---
drivers/iio/proximity/sx9310.c | 4 ++--
drivers/iio/proximity/sx9500.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/proximity/sx9310.c b/drivers/iio/proximity/sx9310.c
index 79ba46d8a0aa..8c197973479a 100644
--- a/drivers/iio/proximity/sx9310.c
+++ b/drivers/iio/proximity/sx9310.c
@@ -992,8 +992,8 @@ static const struct sx931x_info sx9311_info = {
};

static const struct acpi_device_id sx9310_acpi_match[] = {
- { "STH9310", (kernel_ulong_t)&sx9310_info },
- { "STH9311", (kernel_ulong_t)&sx9311_info },
+ { .id = "STH9310", .driver_data = (kernel_ulong_t)&sx9310_info },
+ { .id = "STH9311", .driver_data = (kernel_ulong_t)&sx9311_info },
{ }
};
MODULE_DEVICE_TABLE(acpi, sx9310_acpi_match);
diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
index dadce9b44227..cd67d88d2be4 100644
--- a/drivers/iio/proximity/sx9500.c
+++ b/drivers/iio/proximity/sx9500.c
@@ -1012,8 +1012,8 @@ static int sx9500_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(sx9500_pm_ops, sx9500_suspend, sx9500_resume);

static const struct acpi_device_id sx9500_acpi_match[] = {
- {"SSX9500", 0},
- {"SASX9500", 0},
+ { .id = "SSX9500" },
+ { .id = "SASX9500" },
{ }
};
MODULE_DEVICE_TABLE(acpi, sx9500_acpi_match);

--
2.53.0