From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
acpi4asus-user@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: "João Paulo Rechi Vita" <jprvita@gmail.com>,
"Corentin Chary" <corentin.chary@gmail.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Mark Gross" <markgross@kernel.org>
Subject: Re: [PATCH v3 1/1] platform/x86: asus-wireless: Replace open coded acpi_match_device()
Date: Fri, 6 Oct 2023 19:08:35 +0200 [thread overview]
Message-ID: <371fc87d-ade3-51b8-6f56-4d99dad88873@redhat.com> (raw)
In-Reply-To: <20231006155351.3503665-1-andriy.shevchenko@linux.intel.com>
Hi,
On 10/6/23 17:53, Andy Shevchenko wrote:
> Replace open coded acpi_match_device() in asus_wireless_add().
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> v3: rewrote error path logic (Hans)
> v2: fixed compilation error
> drivers/platform/x86/asus-wireless.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
Thanks, patch looks good to me now:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
>
> diff --git a/drivers/platform/x86/asus-wireless.c b/drivers/platform/x86/asus-wireless.c
> index abf01e00b799..1a571efa02eb 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_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;
next prev parent reply other threads:[~2023-10-06 17:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 15:53 Andy Shevchenko
2023-10-06 17:08 ` Hans de Goede [this message]
2023-10-07 7:25 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=371fc87d-ade3-51b8-6f56-4d99dad88873@redhat.com \
--to=hdegoede@redhat.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=andriy.shevchenko@linux.intel.com \
--cc=corentin.chary@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jprvita@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®