From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753284AbdKJQ2e (ORCPT ); Fri, 10 Nov 2017 11:28:34 -0500 Received: from mx2.suse.de ([195.135.220.15]:34952 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbdKJQ2d (ORCPT ); Fri, 10 Nov 2017 11:28:33 -0500 Date: Fri, 10 Nov 2017 17:28:31 +0100 Message-ID: From: Takashi Iwai To: "Jeremy Cline" Cc: "Liam Girdwood" , "Mark Brown" , , "Jaroslav Kysela" , "Hans de Goede" , Subject: Re: [PATCH v2] ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present In-Reply-To: <0100015fa6bbda9e-656f1a61-3a47-403f-b0d8-550fee55ea9f-000000@email.amazonses.com> References: <0100015fa6bbda9e-656f1a61-3a47-403f-b0d8-550fee55ea9f-000000@email.amazonses.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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