platform/x86: asus-wireless: Replace open coded acpi_match_device()
Subsystems (3)
PATCH v4 1/1 platform/x86: asus-wireless: Replace open coded acpi_match_device()
Replace open coded acpi_match_device() in asus_wireless_add().
Reviewed-by Hans de Goede <[email protected]>
Signed-off-by Andy Shevchenko <[email protected]>
---
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(-)
drivers/platform/x86/asus-wireless.c +4 -8
@@ -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 ;
Signature · 1 line
2.40.0.1.gaa8946217a0b
Ilpo Järvinen
maintainerQuoted 1 line · Andy Shevchenko
Replace open coded
acpi_match_device()inasus_wireless_add().
Could you update this and shortlog too to match the patch (the same applies also to the other similar patch you've inflight).
Signature · 1 line
i.
Quoted 37 lines
Reviewed-by Hans de Goede <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>---
v4: used proper API, added tag (Hans)
v3: rewrote error path logic (Hans)
v2: fixed compilation errordrivers/platform/x86/asus-wireless.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)drivers/platform/x86/asus-wireless.c +4
-8@@ -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 ;