From patchwork Tue Nov 20 17:01:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 151610 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp842560ljp; Tue, 20 Nov 2018 09:01:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/VCDmwX6G7jQUY2IT9CcIt4T3b5iftDMgmq/KdryzEg40e1rcep63Dp2cHEmWOUCAhaonUp X-Received: by 2002:adf:91c3:: with SMTP id 61mr2612914wri.324.1542733315565; Tue, 20 Nov 2018 09:01:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542733315; cv=none; d=google.com; s=arc-20160816; b=jGdDLDYCN3t/yuXi1S3X6pL/9jsL98vNII2u5zPqdMAiGoOrHBGWTBlD+/lL8UEkFU OrhrPluUGXGUsQB0t/N07l6HyPdguvuyZ5oj0l2rVcmT0SpxEAk0kcptlfx4zOMSembh Egk585e3+4VrZObZJzqmz5gpoxvdl2L+cTT/rwI7oDkrIL9QTEiF/sZ8OegVSgMV3rwO wYZ2qGLy4/euvZ+9TjfVNGcodNFJPsvYmdOG41iEczLSL+8HZQ/t5ptVXIzLEobQ3GMd 62mXSQGyBeDGX3EkKEH6YAcRtVsi82NlDBHC/f2ckQFoxSpO6Z/9uoEiuL9ioeUtSiCy XWKQ== 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; bh=mYK8WeFykDdHVqXm2TD88LlBaUNhlLSWz8BXGT5wboI=; b=0/z2kkGD3E0j1DFow19OB7moyqQH4qzNqQ4Zl3imMBhBHetGMV2cMB3XZFPf7cRp7y Mqb7iRlXoIHpnIfXhJcUR9w/fFUUFkIOjOK8RqGkuUYSNGLvLcaCmcGmgeN6Zme+XUBT qfd2Y/ij9tHN+f1bxacrpCGQ16OJGBJ3vXUJsFP7gtuIL/1JE9D0TQwM6XpQ58IMqTxc O0mfCQCZozGFs8ig2nRiRpiIEiLDEoZDW4bblfnfCla8irIXiwKgY0BZiCX18LT5cGGJ jzMSSmxTxqcOp5Pd+iJXXShB6pJBYki50aMaDJKQ8nX76lm7Rh50183XmydIlqKElkpK i5Iw== 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=XF+fPNpz; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id j17si16988344wri.283.2018.11.20.09.01.55; Tue, 20 Nov 2018 09:01:55 -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=XF+fPNpz; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A349C267972; Tue, 20 Nov 2018 18:01:49 +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 638A4267A75; Tue, 20 Nov 2018 18:01:47 +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.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE 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 BA3CF267A73 for ; Tue, 20 Nov 2018 18:01:45 +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=0W+qdc281PTmI3cuKnPgWtn9J90+YMjLdEkyGHX7djM=; b=XF+fPNpz2xq8 NJlOGFjPNrPKkNxYbyjBsmVI1ayQ1KlkIB0mE5ZTv0MV/1dGFAGKC4muYwNhz/zWk3leD5xZKWcuv 0fBRuY41zhHFcpSx0tnHjSy56UpGNe74U0Di3qvOFe/O2QIV9TrXaaKYcgKv32FkJrDvKo8bJolJu IUwDY=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gP9PF-0001pi-HY; Tue, 20 Nov 2018 17:01:45 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 366391124DC2; Tue, 20 Nov 2018 17:01:45 +0000 (GMT) From: Mark Brown To: Keyon Jie In-Reply-To: <20181117004706.15911-2-pierre-louis.bossart@linux.intel.com> Message-Id: <20181120170145.366391124DC2@debutante.sirena.org.uk> Date: Tue, 20 Nov 2018 17:01:45 +0000 (GMT) Cc: alsa-devel@alsa-project.org, tiwai@suse.de, Pierre-Louis Bossart , liam.r.girdwood@linux.intel.com, vkoul@kernel.org, broonie@kernel.org, andriy.shevchenko@linux.intel.com Subject: [alsa-devel] Applied "ASoC: acpi: fix: continue searching when machine is ignored" 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: acpi: fix: continue searching when machine is ignored 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 a3e620f8422832afd832ad5e20aa97d0c72bada8 Mon Sep 17 00:00:00 2001 From: Keyon Jie Date: Fri, 16 Nov 2018 18:47:04 -0600 Subject: [PATCH] ASoC: acpi: fix: continue searching when machine is ignored The machine_quirk may return NULL which means the acpi entries should be skipped and search for next matched entry is needed, here add return check here and continue for NULL case. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown --- sound/soc/soc-acpi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.19.0.rc2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/soc-acpi.c b/sound/soc/soc-acpi.c index b8e72b52db30..4fb29f0e561e 100644 --- a/sound/soc/soc-acpi.c +++ b/sound/soc/soc-acpi.c @@ -10,11 +10,17 @@ struct snd_soc_acpi_mach * snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines) { struct snd_soc_acpi_mach *mach; + struct snd_soc_acpi_mach *mach_alt; for (mach = machines; mach->id[0]; mach++) { if (acpi_dev_present(mach->id, NULL, -1)) { - if (mach->machine_quirk) - mach = mach->machine_quirk(mach); + if (mach->machine_quirk) { + mach_alt = mach->machine_quirk(mach); + if (!mach_alt) + continue; /* not full match, ignore */ + mach = mach_alt; + } + return mach; } }