diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-10-10 16:40:19 +0300 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2023-10-12 16:34:09 +0300 |
commit | 5a026767275ef0ba6d7aba37629d9ec638aabb7d (patch) | |
tree | 7b6239c2ab1589fc5ba1e6aae8c596a8a52ce211 /drivers/platform/x86/asus-wireless.c | |
parent | 39789590cff4043d81774d03777dabf7ba263176 (diff) | |
download | linux-5a026767275ef0ba6d7aba37629d9ec638aabb7d.tar.xz |
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 <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231010134019.3892062-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/asus-wireless.c')
-rw-r--r-- | drivers/platform/x86/asus-wireless.c | 12 |
1 files 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; |