Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jeremy Cline <jeremy@jcline.org>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v2] ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present
Date: Fri, 10 Nov 2017 17:28:31 +0100	[thread overview]
Message-ID: <s5hvaiiayj4.wl-tiwai@suse.de> (raw)
In-Reply-To: <0100015fa6bbda9e-656f1a61-3a47-403f-b0d8-550fee55ea9f-000000@email.amazonses.com>

On Fri, 10 Nov 2017 17:20:50 +0100,
Jeremy Cline wrote:
>  struct snd_soc_acpi_mach *
>  snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
>  {
>  	struct snd_soc_acpi_mach *mach;
>  
>  	for (mach = machines; mach->id[0]; mach++) {
> -		if (snd_soc_acpi_check_hid(mach->id) == true) {
> +		if (acpi_dev_present(mach->id, NULL, -1) == true) {

"== true" is redundant.  Just use a style
		if (acpi_dev_present(...)) {

You don't need to follow the original code style.


> @@ -163,7 +135,7 @@ struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
>  		return mach;
>  
>  	for (i = 0; i < codec_list->num_codecs; i++) {
> -		if (snd_soc_acpi_check_hid(codec_list->codecs[i]) != true)
> +		if (acpi_dev_present(codec_list->codecs[i], NULL, -1) != true)

Ditto, use
		if (!acpi_dev_present(...))


thanks,

Takashi

      reply	other threads:[~2017-11-10 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10 16:20 [PATCH v2] ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present Jeremy Cline
2017-11-10 16:28 ` Takashi Iwai [this message]

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=s5hvaiiayj4.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=jeremy@jcline.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@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