From patchwork Sat Aug 29 15:06:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 7095381 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 66E60BEEC1 for ; Sat, 29 Aug 2015 15:07:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7EC6F20695 for ; Sat, 29 Aug 2015 15:07:00 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4A82120689 for ; Sat, 29 Aug 2015 15:06:57 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5A9F12606A5; Sat, 29 Aug 2015 17:06:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 7F51F26067A; Sat, 29 Aug 2015 17:06:47 +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 39C4E26067B; Sat, 29 Aug 2015 17:06:46 +0200 (CEST) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by alsa0.perex.cz (Postfix) with ESMTP id 12036260671 for ; Sat, 29 Aug 2015 17:06:38 +0200 (CEST) Received: by padhm10 with SMTP id hm10so36198305pad.3 for ; Sat, 29 Aug 2015 08:06:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=SASO7qRzhoAfYx//OEeV8RZP3GN+CpwYeFZskbpfQOw=; b=NMNg+p/jqLkcSUHgQeTsYp7SBIJNsF87NEI3lIyYIN8bcgLFsPQQMf6DrxODHE5So4 2MDqooA/qRl01tesgkcv/6nH+r5ayOFJiUDWFFJzHxK4hbNVX3Yl+8YrBwKG+HKSVm2k CP4tHRhRkQqbPeZ0UALGUGwYAFk2bAQz0avwGErVU8PvxQFCkTNWkMneauEpKCk+hudl NAuWgo8AYZpQX6AiTjPaaBzVUNCBTBv3lgsixniGE5hTyBcz1rWLV7CbxOPZ1hBNBMpC ozekw8L6q6RSNN61ca9ZW+wLwzwwhJ/gZO8sK41QFp+NSUY5TL9/Izd5uFXqfsd9Efh1 pWeQ== X-Gm-Message-State: ALoCoQnQ8Y1HfpVldVtWbI2GkU225YIv2iyF2DC80hSBB1d0FRg7F4o3Z8xypPIg3VNOy7LZ8qTq X-Received: by 10.67.14.6 with SMTP id fc6mr24108938pad.9.1440860797313; Sat, 29 Aug 2015 08:06:37 -0700 (PDT) Received: from phoenix.local (218-164-130-19.dynamic.hinet.net. [218.164.130.19]) by smtp.gmail.com with ESMTPSA id v3sm8946843pdf.42.2015.08.29.08.06.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Aug 2015 08:06:36 -0700 (PDT) Message-ID: <1440860792.28601.0.camel@ingics.com> From: Axel Lin To: Mark Brown Date: Sat, 29 Aug 2015 23:06:32 +0800 X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Cc: alsa-devel@alsa-project.org, Arnaud Pouliquen , Liam Girdwood Subject: [alsa-devel] [PATCH] ASoC: sti_uniperif: Ensure component is unregistered when unload module 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Use devm_snd_soc_register_component to ensure component is unregistered when unload the module. Signed-off-by: Axel Lin --- sound/soc/sti/sti_uniperif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/sti/sti_uniperif.c b/sound/soc/sti/sti_uniperif.c index dffabf3..39bcefe 100644 --- a/sound/soc/sti/sti_uniperif.c +++ b/sound/soc/sti/sti_uniperif.c @@ -224,9 +224,9 @@ static int sti_uniperiph_probe(struct platform_device *pdev) dev_set_drvdata(&pdev->dev, priv); - ret = snd_soc_register_component(&pdev->dev, - &sti_uniperiph_dai_component, - priv->dai, 1); + ret = devm_snd_soc_register_component(&pdev->dev, + &sti_uniperiph_dai_component, + priv->dai, 1); if (ret < 0) return ret;