From patchwork Wed Aug 16 12:09:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 110225 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp691237qge; Wed, 16 Aug 2017 05:09:18 -0700 (PDT) X-Received: by 10.223.132.2 with SMTP id 2mr1220199wrf.69.1502885358881; Wed, 16 Aug 2017 05:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502885358; cv=none; d=google.com; s=arc-20160816; b=OSv6Gliy2VBa+4kHiyz2o0Lxo/64nKaoo31RJMvsoEN1gCZAkeLUYs9iRui908l13k 2YB2X00NTkmyoxhJFs6zPD7FXd3FK+M2CupHgTsiNZwvyWExew2i7Mru0xX1P/bWEZTE kIVnBLNsiZ3aFuNTcNqnC7iODxTztwOEi4JaiOOqdZU8VSrZEBY36gZME3pvkJ4qcvLY esay+QUssfMCIaKR1iUF97CYv22rWY3es9Zg/PyeWQ7+NFoCvAQMFI/oIdn7LW1ho48n 0DQrcMkSrPVAhBel/5W9Oa0+u0Tc6VrencrrJFLrjfEo1RIdU1sQwVVuSM6svemi36Du yCag== 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=5JmaCj3AcBaPQ/g278+tJQiTmbSUf/GZFcL+fJRRC4U=; b=Cr+lh7p8cKOf9qeIn9+Lv8O5YOCaeHsSXfsKUqsMbjyjjZSh8pGmP2mkOopSHu5xGF Aq5i6jRhirBC/sAgNcnXQ9WI+cwpYiDuX1tQE42UAsvZD0EpQP/sZ1ATIxcCg91cPjV5 eDPSUmfnBIEU+vgrjWVJ/7cLLW/a3Iw0NAb7sCR69oFnR5ObFM0/j1IpnhUu/fx4TxLa Aq1ti/1kXHknXt5+Hd+G1CqJeqi653ZO91a05VibjgeBA1jdS66Q9DTXZrEMAjhIewbi 10YjNoLOfGUhLeUMGewBrp6/GFamP/gAKm3qYmAZqAeDnHnD4pMZfiNZKDf0zuI/rIC4 FhWQ== 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=kAg1Sond; 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 l187si762162wmf.36.2017.08.16.05.09.18; Wed, 16 Aug 2017 05:09:18 -0700 (PDT) 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=kAg1Sond; 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 02E9C266EA0; Wed, 16 Aug 2017 14:09:17 +0200 (CEST) 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 CF0A1266EA9; Wed, 16 Aug 2017 14:09:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_NEUTRAL 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 093EF266B1C for ; Wed, 16 Aug 2017 14:09:13 +0200 (CEST) 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=wSY5qSvp/QzVsQw/tzCtKjURzfmOvRpAWS8tpRgKxaA=; b=kAg1Sond5RP7 r0CoGUuY+TCaApTop33v3yd9WJxyxdjN+9uwJj8dTtNcqdqD+KcC6wmjT2QyZ9LmsbB2LFxH7Kghu 0fY1ARN4SQfNqB26yIJZ8emV9BtIa9RWb4YSdbZ90PCSAKx1SV2Gri+u7b+2YfXRuyhmQxY9trw0x DhY2s=; Received: from [2001:470:1f1d:6b5:7e7a:91ff:fede:4a45] (helo=finisterre) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1dhx8F-0004M4-Qx; Wed, 16 Aug 2017 12:09:07 +0000 Received: from broonie by finisterre with local (Exim 4.89) (envelope-from ) id 1dhx8F-0005bE-As; Wed, 16 Aug 2017 13:09:07 +0100 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <8760e0jfwl.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Wed, 16 Aug 2017 13:09:07 +0100 Cc: alsa-devel@alsa-project.org, Mark Brown , Simon Subject: [alsa-devel] Applied "ASoC: soc-core: snd_soc_unregister_component() unregister all component" 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: soc-core: snd_soc_unregister_component() unregister all component has been applied to the asoc tree at git://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 2eccea8cdeb8fe455fc3a45b4e097f118449c3ef Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 7 Aug 2017 02:06:55 +0000 Subject: [PATCH] ASoC: soc-core: snd_soc_unregister_component() unregister all component Current snd_soc_unregister_component() unregisters first found component only which was specified by dev. This style can't specify concrete component if system registered some component with same dev. And system need to call this function many times. This patch unregister all related component by 1 call. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/soc-core.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 2.13.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b1860b14b075..50c8dba54649 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3365,11 +3365,12 @@ int snd_soc_register_component(struct device *dev, EXPORT_SYMBOL_GPL(snd_soc_register_component); /** - * snd_soc_unregister_component - Unregister a component from the ASoC core + * snd_soc_unregister_component - Unregister all related component + * from the ASoC core * * @dev: The device to unregister */ -void snd_soc_unregister_component(struct device *dev) +static int __snd_soc_unregister_component(struct device *dev) { struct snd_soc_component *component; int found = 0; @@ -3391,6 +3392,13 @@ void snd_soc_unregister_component(struct device *dev) snd_soc_component_cleanup(component); kfree(component); } + + return found; +} + +void snd_soc_unregister_component(struct device *dev) +{ + while (__snd_soc_unregister_component(dev)); } EXPORT_SYMBOL_GPL(snd_soc_unregister_component);