diff mbox series

[v2,2/5] iio: magnetometer: ak8975: Sort ID and ACPI tables

Message ID 20230818075600.24277-3-biju.das.jz@bp.renesas.com (mailing list archive)
State Accepted
Headers show
Series OF/ACPI/ID Match table improvements for ak8975 driver | expand

Commit Message

Biju Das Aug. 18, 2023, 7:55 a.m. UTC
Sort ID table alphabetically by name and acpi table by HID.

While at it, drop blank line before ID table.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v2:
 * New patch
---
 drivers/iio/magnetometer/ak8975.c | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

Comments

Andy Shevchenko Aug. 18, 2023, 11:28 a.m. UTC | #1
On Fri, Aug 18, 2023 at 08:55:57AM +0100, Biju Das wrote:
> Sort ID table alphabetically by name and acpi table by HID.

ACPI

> While at it, drop blank line before ID table.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Biju Das Aug. 18, 2023, 12:12 p.m. UTC | #2
Hi Andy Shevchenko,

Thanks for the feedback.

> Subject: Re: [PATCH v2 2/5] iio: magnetometer: ak8975: Sort ID and ACPI
> tables
> 
> On Fri, Aug 18, 2023 at 08:55:57AM +0100, Biju Das wrote:
> > Sort ID table alphabetically by name and acpi table by HID.
> 
> ACPI

Agreed, not sure Jonathan can do this fix while applying??

Cheers,
Biju

> 
> > While at it, drop blank line before ID table.
> 
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> --
> With Best Regards,
> Andy Shevchenko
>
diff mbox series

Patch

diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
index 104798549de1..8cfceb007936 100644
--- a/drivers/iio/magnetometer/ak8975.c
+++ b/drivers/iio/magnetometer/ak8975.c
@@ -812,18 +812,6 @@  static const struct iio_info ak8975_info = {
 	.read_raw = &ak8975_read_raw,
 };
 
-static const struct acpi_device_id ak_acpi_match[] = {
-	{"AK8975", (kernel_ulong_t)&ak_def_array[AK8975] },
-	{"AK8963", (kernel_ulong_t)&ak_def_array[AK8963] },
-	{"INVN6500", (kernel_ulong_t)&ak_def_array[AK8963] },
-	{"AK009911", (kernel_ulong_t)&ak_def_array[AK09911] },
-	{"AK09911", (kernel_ulong_t)&ak_def_array[AK09911] },
-	{"AKM9911", (kernel_ulong_t)&ak_def_array[AK09911] },
-	{"AK09912", (kernel_ulong_t)&ak_def_array[AK09912] },
-	{ }
-};
-MODULE_DEVICE_TABLE(acpi, ak_acpi_match);
-
 static void ak8975_fill_buffer(struct iio_dev *indio_dev)
 {
 	struct ak8975_data *data = iio_priv(indio_dev);
@@ -1061,16 +1049,27 @@  static int ak8975_runtime_resume(struct device *dev)
 static DEFINE_RUNTIME_DEV_PM_OPS(ak8975_dev_pm_ops, ak8975_runtime_suspend,
 				 ak8975_runtime_resume, NULL);
 
+static const struct acpi_device_id ak_acpi_match[] = {
+	{"AK8963", (kernel_ulong_t)&ak_def_array[AK8963] },
+	{"AK8975", (kernel_ulong_t)&ak_def_array[AK8975] },
+	{"AK009911", (kernel_ulong_t)&ak_def_array[AK09911] },
+	{"AK09911", (kernel_ulong_t)&ak_def_array[AK09911] },
+	{"AK09912", (kernel_ulong_t)&ak_def_array[AK09912] },
+	{"AKM9911", (kernel_ulong_t)&ak_def_array[AK09911] },
+	{"INVN6500", (kernel_ulong_t)&ak_def_array[AK8963] },
+	{ }
+};
+MODULE_DEVICE_TABLE(acpi, ak_acpi_match);
+
 static const struct i2c_device_id ak8975_id[] = {
-	{"ak8975", (kernel_ulong_t)&ak_def_array[AK8975] },
-	{"ak8963", (kernel_ulong_t)&ak_def_array[AK8963] },
 	{"AK8963", (kernel_ulong_t)&ak_def_array[AK8963] },
+	{"ak8963", (kernel_ulong_t)&ak_def_array[AK8963] },
+	{"ak8975", (kernel_ulong_t)&ak_def_array[AK8975] },
 	{"ak09911", (kernel_ulong_t)&ak_def_array[AK09911] },
 	{"ak09912", (kernel_ulong_t)&ak_def_array[AK09912] },
 	{"ak09916", (kernel_ulong_t)&ak_def_array[AK09916] },
 	{}
 };
-
 MODULE_DEVICE_TABLE(i2c, ak8975_id);
 
 static const struct of_device_id ak8975_of_match[] = {