lkml.org 
[lkml]   [2017]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2] ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present
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

\
 
 \ /
  Last update: 2017-11-10 17:28    [W:0.041 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site