From patchwork Mon Jan 8 16:23:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 123743 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2930007qgn; Mon, 8 Jan 2018 08:26:12 -0800 (PST) X-Google-Smtp-Source: ACJfBouFbJTzVRcZcZboQaiMQallUYIJmgjBIAVAVBuR3cLw07jcsQhesSkBCNrf5WXavrl6AjnT X-Received: by 10.28.167.80 with SMTP id q77mr9920037wme.114.1515428772143; Mon, 08 Jan 2018 08:26:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515428772; cv=none; d=google.com; s=arc-20160816; b=i8BmXMoh6yWp3RZCFk98EvZqfGXUjQIt5W6h+w9vS9Qp9VX1PNHU+lqdoqBjvslzW6 jdunZBJ0R+Ge8bo5U1rQlcJtHBU6iOks9S1vNtjtUU3lfsV3slXa5qvJyF7tzj1E1TJm dfLx3MzXSXmtXiWii3Was3LXGQiiBpdgPGVUJXEWc5OmtkVAjShwwurPXi0BDrOhvCHK eTpXvzIelLqaXaukBzxqjv8sRlBHi00GMQ9htpnA1L9Y70ipdhPk3SK+uP/AQkf4xwHK KgMiru/RB23XkJlA7gSTPRd34a4SfeHJkBuFxNGXx68YUzIyE2931p01muwJbkci4P9P JM7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=eCt9Nyk/6ye1UT7yhqmCK3WjJqexmJDj9CXkiK/E7Zw=; b=yFnGanJWNBqCvYd3hV0HRt1RpA2Cc2DXwDm9NroFqNP1SOuktZIdag1BjSuf68Pwgo hUzEZfYxZym//+XVKcTTnZJkda2lWouJcMca94cUn+jD0HgdaivEaXP2iq0DgpCpBP4S V9QfkqJbV//F61p7fT8wFh0wAw3yS1XnAfJVzTHONGesbbXGqzdX9dJs8TAhFuLKkK4D HPbH+HwCqDnd+OgbMZx6VCmtDw2CwV7hLx03Swp0oIPk22yTzWJ0+BUIU9+W0MvrZM85 /HF3z6uRU/QdxdSJ/yfpA6hg/XhpRLW1uY7x7rFUJavjqdPUM4LSBwq3eK6v/oNHTxwe LRHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=BGkNYFyH; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id a5si9108124wrf.227.2018.01.08.08.26.11; Mon, 08 Jan 2018 08:26:12 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=BGkNYFyH; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 632C4267699; Mon, 8 Jan 2018 17:24:57 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 77930267692; Mon, 8 Jan 2018 17:24:55 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 5DF6226750E for ; Mon, 8 Jan 2018 17:23:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=UajHvafan7FdBmuH9Sv953Fmo5q9TSe0b6qHw+wtDP8=; b=BGkNYFyHncP0 qzWxZHL/EFRS5kuNUmTjbs5UNwlruds8/XPaBE/wHKzVykfg/W3O+E4XO/rQKs2MLnw94J0rYJx+n PIPPwR8B6gLaqPuib8d1JqdSO+6DnOz7KbyW79EvS/AGf4kb3mghmrybaSu3rux71PQnCqlQN8ku0 sxlTw=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eYaD0-00025Q-LT; Mon, 08 Jan 2018 16:23:34 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1eYaD0-0002JA-7A; Mon, 08 Jan 2018 16:23:34 +0000 From: Mark Brown To: Jeremy Cline In-Reply-To: <20180105205536.10366-3-pierre-louis.bossart@linux.intel.com> Message-Id: Date: Mon, 08 Jan 2018 16:23:34 +0000 Cc: jeremy@jcline.org, alsa-devel@alsa-project.org, tiwai@suse.de, Pierre-Louis Bossart , liam.r.girdwood@linux.intel.com, vinod.koul@intel.com, broonie@kernel.org, andriy.shevchenko@linux.intel.com Subject: [alsa-devel] Applied "ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 0d5ea120abc020fada1f7cb019ec37f13162e7af Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Fri, 5 Jan 2018 14:55:34 -0600 Subject: [PATCH] ASoC: Replace snd_soc_acpi_check_hid with acpi_dev_present Replace snd_soc_acpi_check_hid() with the generic acpi_dev_present() and remove the now unused snd_soc_acpi_check_hid function. This should have no functional change. Signed-off-by: Jeremy Cline Signed-off-by: Pierre-Louis Bossart Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown --- include/sound/soc-acpi.h | 3 --- sound/soc/soc-acpi.c | 32 ++------------------------------ 2 files changed, 2 insertions(+), 33 deletions(-) -- 2.15.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h index a7d8d335b043..057805489af3 100644 --- a/include/sound/soc-acpi.h +++ b/include/sound/soc-acpi.h @@ -49,9 +49,6 @@ snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN], struct snd_soc_acpi_mach * snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines); -/* acpi check hid */ -bool snd_soc_acpi_check_hid(const u8 hid[ACPI_ID_LEN]); - /** * snd_soc_acpi_mach: ACPI-based machine descriptor. Most of the fields are * related to the hardware, except for the firmware and topology file names. diff --git a/sound/soc/soc-acpi.c b/sound/soc/soc-acpi.c index d4dd2efea45e..7f43c9bf3d09 100644 --- a/sound/soc/soc-acpi.c +++ b/sound/soc/soc-acpi.c @@ -49,41 +49,13 @@ const char *snd_soc_acpi_find_name_from_hid(const u8 hid[ACPI_ID_LEN]) } EXPORT_SYMBOL_GPL(snd_soc_acpi_find_name_from_hid); -static acpi_status snd_soc_acpi_mach_match(acpi_handle handle, u32 level, - void *context, void **ret) -{ - unsigned long long sta; - acpi_status status; - - *(bool *)context = true; - status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); - if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT)) - *(bool *)context = false; - - return AE_OK; -} - -bool snd_soc_acpi_check_hid(const u8 hid[ACPI_ID_LEN]) -{ - acpi_status status; - bool found = false; - - status = acpi_get_devices(hid, snd_soc_acpi_mach_match, &found, NULL); - - if (ACPI_FAILURE(status)) - return false; - - return found; -} -EXPORT_SYMBOL_GPL(snd_soc_acpi_check_hid); - 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)) { if (mach->machine_quirk) mach = mach->machine_quirk(mach); return mach; @@ -161,7 +133,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)) return NULL; }