mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_acpi_device()
@ 2023-10-10 13:40 Andy Shevchenko
  2023-10-12 14:12 ` Ilpo Järvinen
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2023-10-10 13:40 UTC (permalink / raw)
  To: Hans de Goede, Andy Shevchenko, platform-driver-x86,
	acpi4asus-user, linux-kernel
  Cc: João Paulo Rechi Vita, Corentin Chary, Ilpo Järvinen,
	Mark Gross

Replace open coded acpi_match_acpi_device() in asus_wireless_add().

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---

v5: updated subject (Ilpo)
v4: used proper API, added tag (Hans)
v3: rewrote error path logic (Hans)
v2: fixed compilation error

 drivers/platform/x86/asus-wireless.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/platform/x86/asus-wireless.c b/drivers/platform/x86/asus-wireless.c
index abf01e00b799..41227bf95878 100644
--- a/drivers/platform/x86/asus-wireless.c
+++ b/drivers/platform/x86/asus-wireless.c
@@ -148,16 +148,12 @@ 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;
-		}
-	}
-	if (!data->hswc_params)
+	id = acpi_match_acpi_device(device_ids, adev);
+	if (!id)
 		return 0;
 
+	data->hswc_params = (const struct hswc_params *)id->driver_data;
+
 	data->wq = create_singlethread_workqueue("asus_wireless_workqueue");
 	if (!data->wq)
 		return -ENOMEM;
-- 
2.40.0.1.gaa8946217a0b


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

* Re: [PATCH v5 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_acpi_device()
  2023-10-10 13:40 [PATCH v5 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_acpi_device() Andy Shevchenko
@ 2023-10-12 14:12 ` Ilpo Järvinen
  0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2023-10-12 14:12 UTC (permalink / raw)
  To: Hans de Goede, platform-driver-x86, acpi4asus-user, linux-kernel,
	Andy Shevchenko
  Cc: João Paulo Rechi Vita, Corentin Chary, Mark Gross

On Tue, 10 Oct 2023 16:40:19 +0300, Andy Shevchenko wrote:

> Replace open coded acpi_match_acpi_device() in asus_wireless_add().
> 
> 


Thank you for your contribution, it has been applied to my local
review-ilpo branch. Note it will show up in the public
platform-drivers-x86/review-ilpo branch only once I've pushed my
local branch there, which might take a while.

Once I've run some tests on the review-ilpo branch the patches
there will be added to the platform-drivers-x86/for-next branch
and eventually will be included in the pdx86 pull-request to
Linus for the next merge-window.

The list of commits applied:
[1/1] platform/x86: asus-wireless: Replace open coded acpi_match_acpi_device()
      commit: 5a026767275ef0ba6d7aba37629d9ec638aabb7d

--
 i.


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

end of thread, other threads:[~2023-10-12 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-10 13:40 [PATCH v5 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_acpi_device() Andy Shevchenko
2023-10-12 14:12 ` Ilpo Järvinen

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

all inboxes | Powered by JetHome®