From patchwork Tue Apr 5 07:29:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 556714 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B42EC35280 for ; Tue, 5 Apr 2022 12:03:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245056AbiDEMCU (ORCPT ); Tue, 5 Apr 2022 08:02:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357982AbiDEK1i (ORCPT ); Tue, 5 Apr 2022 06:27:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B4A1D1129; Tue, 5 Apr 2022 03:12:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0C7EBB81B7A; Tue, 5 Apr 2022 10:12:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72122C385A1; Tue, 5 Apr 2022 10:12:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649153528; bh=4lZzfR6bP3TVkydAsimglmlqrBN2DHr5sdBuTyg00Hw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KlBc8iBQMrgaSFUCacG47ykivwVjlbATYPeq2UOySH7iQPE6jDUea6F9sliIB1yso Dbk8qYGBKIOLOq2mkn/4+vxr7TzAzFIP/3LKg+EDhzVZn5cQOKft9nnB9ddyAvJHQX xoENY55ZRNfqtIc7IAaXC90bfsquf+l2xjUnP1wc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang , Mark Brown , Sasha Levin Subject: [PATCH 5.10 255/599] ASoC: atmel: sam9x5_wm8731: use devm_snd_soc_register_card() Date: Tue, 5 Apr 2022 09:29:09 +0200 Message-Id: <20220405070306.428435715@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070258.802373272@linuxfoundation.org> References: <20220405070258.802373272@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yang Yingliang [ Upstream commit 6522a8486c00d130a32a57c6c8a365572958b4df ] Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210602141619.323286-1-yangyingliang@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/atmel/sam9x5_wm8731.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c index 9fbc3c1113cc..7745250fd743 100644 --- a/sound/soc/atmel/sam9x5_wm8731.c +++ b/sound/soc/atmel/sam9x5_wm8731.c @@ -159,7 +159,7 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) of_node_put(codec_np); of_node_put(cpu_np); - ret = snd_soc_register_card(card); + ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) { dev_err(&pdev->dev, "Platform device allocation failed\n"); goto out_put_audio; @@ -180,7 +180,6 @@ static int sam9x5_wm8731_driver_remove(struct platform_device *pdev) struct snd_soc_card *card = platform_get_drvdata(pdev); struct sam9x5_drvdata *priv = card->drvdata; - snd_soc_unregister_card(card); atmel_ssc_put_audio(priv->ssc_id); return 0;