public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_device()
@ 2022-06-30 19:32 Andy Shevchenko
  2022-06-30 23:28 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andy Shevchenko @ 2022-06-30 19:32 UTC (permalink / raw)
  To: Andy Shevchenko, acpi4asus-user, platform-driver-x86,
	linux-kernel
  Cc: Corentin Chary, João Paulo Rechi Vita, Hans de Goede,
	Mark Gross

Replace open coded acpi_match_device() in asus_wireless_add().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/platform/x86/asus-wireless.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/platform/x86/asus-wireless.c b/drivers/platform/x86/asus-wireless.c
index d3e7171928e5..2281a3b7d958 100644
--- a/drivers/platform/x86/asus-wireless.c
+++ b/drivers/platform/x86/asus-wireless.c
@@ -148,13 +148,9 @@ static int asus_wireless_add(struct acpi_device *adev)
 	if (err)
 		return err;
 
-	for (id = device_ids; id->id[0]; id++) {
-		if (!strcmp((char *) id->id, acpi_device_hid(adev))) {
-			data->hswc_params =
-				(const struct hswc_params *)id->driver_data;
-			break;
-		}
-	}
+	id = acpi_match_device(adev, device_ids);
+	if (id)
+		data->hswc_params = (const struct hswc_params *)id->driver_data;
 	if (!data->hswc_params)
 		return 0;
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-01 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-30 19:32 [PATCH v1 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_device() Andy Shevchenko
2022-06-30 23:28 ` kernel test robot
2022-07-01  2:40 ` kernel test robot
2022-07-01 11:50 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox