From patchwork Fri Aug 18 07:55:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13357437 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAB1DC7113D for ; Fri, 18 Aug 2023 07:57:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358393AbjHRH4w (ORCPT ); Fri, 18 Aug 2023 03:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358477AbjHRH4o (ORCPT ); Fri, 18 Aug 2023 03:56:44 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 25FE54209; Fri, 18 Aug 2023 00:56:20 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.01,182,1684767600"; d="scan'208";a="173263209" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 18 Aug 2023 16:56:13 +0900 Received: from localhost.localdomain (unknown [10.226.93.81]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B72AB41BBD7D; Fri, 18 Aug 2023 16:56:10 +0900 (JST) From: Biju Das To: Jonathan Cameron Cc: Biju Das , Lars-Peter Clausen , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Andy Shevchenko , linux-iio@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , linux-renesas-soc@vger.kernel.org Subject: [PATCH v2 2/5] iio: magnetometer: ak8975: Sort ID and ACPI tables Date: Fri, 18 Aug 2023 08:55:57 +0100 Message-Id: <20230818075600.24277-3-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230818075600.24277-1-biju.das.jz@bp.renesas.com> References: <20230818075600.24277-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Sort ID table alphabetically by name and acpi table by HID. While at it, drop blank line before ID table. Suggested-by: Andy Shevchenko Signed-off-by: Biju Das Reviewed-by: Andy Shevchenko --- v2: * New patch --- drivers/iio/magnetometer/ak8975.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) 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[] = {