Skip to content

Commit 5a02676

Browse files
andy-shevij-intel
authored andcommitted
platform/x86: asus-wireless: Replace open coded acpi_match_acpi_device()
Replace open coded acpi_match_acpi_device() in asus_wireless_add(). Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 3978959 commit 5a02676

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

drivers/platform/x86/asus-wireless.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,12 @@ static int asus_wireless_add(struct acpi_device *adev)
148148
if (err)
149149
return err;
150150

151-
for (id = device_ids; id->id[0]; id++) {
152-
if (!strcmp((char *) id->id, acpi_device_hid(adev))) {
153-
data->hswc_params =
154-
(const struct hswc_params *)id->driver_data;
155-
break;
156-
}
157-
}
158-
if (!data->hswc_params)
151+
id = acpi_match_acpi_device(device_ids, adev);
152+
if (!id)
159153
return 0;
160154

155+
data->hswc_params = (const struct hswc_params *)id->driver_data;
156+
161157
data->wq = create_singlethread_workqueue("asus_wireless_workqueue");
162158
if (!data->wq)
163159
return -ENOMEM;

0 commit comments

Comments
 (0)