From patchwork Wed Jan 10 01:27:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13515606 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2119.outbound.protection.outlook.com [40.107.113.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32CD4184E for ; Wed, 10 Jan 2024 01:28:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="Y/76V+52" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZiRLBQuVJFT0zY75qGUX2xuElfm6/NnVSlpC01cW9FBxKNPpp/k6pYu+9/DayPJF3uU4HG2emBGreSN639YXpZkImTecJeU2ql0I9Cj6Kv/hujRzq7FTmOwqMbpANRT2RILZ0GOPpI4GqHfNEnM8oJS2DzJpW/QPqpzThtgLQWw9A4Pu4t4nDdSTPZTphA2+6GIh0c8UF9wsww+BxswmXx6sgMtTF8vZzqEC71jaGzwKrNpyW4OCg/8OPy3pFxvcGX5tfSg+FVEdORVnXs23UhJwBajoHy7wsNca11Xo6VCshBCwLv5Qhu05OjSzIEmPweP9fSTi/mPLubtBxNxr8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sS9y6VpoNPpYM60rAeyrbxprqCGJwjIbhK7CHYnvZ7c=; b=HTPUn/ZRFyMEzrFEExF+xqPNMJPJ6SPawF4+qrQIbEJ5UgHM/lrcBzkGZgsOoDVpehpuMlE8IrChHDR9OzIFvEq1XxJ7jaHHecTzKkQqBVB1YDJ5jBkY7LRj1qK8A7RDZPADaj+SE3tSK6tX/iqbT4paDyifBWFjR4pNs6MM61xwyWrzY3lyStigz1DelIWTU8Q5U298Gzvxbf3CtXHAxxitbPXuPvVrrrhUuwDxeBoih0y6Ex343a97aL6zrPBOQuJ/AG709y3ZzuSFiD5XrRm2vzwoJ54b+oIO76YWK+KAcT/C/17L45E0SLxBcV3dhLN3JcRH8x+irfIqoVAmYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sS9y6VpoNPpYM60rAeyrbxprqCGJwjIbhK7CHYnvZ7c=; b=Y/76V+52fTLLwAN2JsaPKYGwcSi8AoV7UKYa3G5gWhG8KqRt9qD9vjHtuiJ32hX8aEo55YdBP1pFZCv8nLq63rz7WO0KPnv8xQeWUCG22OCkZT85I8pz8eFih4zCmZcN04yVc8n33d8/NbEBLzgM3AUtGxsFMEqVYla2yWYS1G0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8341.jpnprd01.prod.outlook.com (2603:1096:400:15c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.17; Wed, 10 Jan 2024 01:27:58 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b%7]) with mapi id 15.20.7181.015; Wed, 10 Jan 2024 01:27:58 +0000 Message-ID: <875y02geox.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jarkko Nikula , Jaroslav Kysela , Liam Girdwood , Mark Brown , Peter Ujfalusi , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org In-Reply-To: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> References: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 1/6] ASoC: ti: use devm_snd_soc_register_card() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Wed, 10 Jan 2024 01:27:58 +0000 X-ClientProxiedBy: TYAPR01CA0118.jpnprd01.prod.outlook.com (2603:1096:404:2a::34) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8341:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b074733-62c4-410e-ef97-08dc117b6117 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rROfLiO2wymmRbvet2fxRFRjiAO7myFmKDtFzFMMxGv6dovu90iboCPMTWhiHRA+7Vc0cd2fR11k+cP+v4iFvC5AjJlK8W6oqYSXgv6YJ4xMxpqw4Sghn1RAMi9mCdoe7HO5Vx63Fz2XzitWeiKPlu42Ez6GNnhJcS7rAtjudjB2rD2vZ9j7GXYcvEQ74a/zMkFJX3WZFD1sQZtcwjhiWjjH07XZF6K+9gWqwRIB5cIdhsO7d0O+w8N9d/ZjF19I6w/fA01uv6/sK+1FNKz+9Vue4ZwSh3D/BUKF3P6JmtEKsQI7DM5vjFxCC/L4BFqqX4wA/CvhdHmo1jSt4CUBzYH6PbdBtBsIzJL493HtX5ctwmsg9vD+OMQiRGPywsqpbnxsHIo2H3yXiMG2MpL42zUTxx2J5dJ90PUe57Y/gjgcIKXKz4bO+XAyM6PLVuEcUjgkMKPe+cqosPwspm0LkBDEkbMCcQgkkddkzahdRZ88vdhg2gpM9izlql9FNLUlRe1pd1faT5dLKsweHsKtPoxAS0/txqyj2RP/0QBuo4znzQ+dVUG6xGrgGB82JxjH5k9AZpfe4ezUxN+rOeU8Lfp+x18dgFC41jfbZFqjNOIyAnSfuM/yft0mMGL2bxot X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(346002)(396003)(39860400002)(136003)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(38100700002)(38350700005)(36756003)(86362001)(83380400001)(2616005)(26005)(66946007)(110136005)(6506007)(6512007)(478600001)(52116002)(316002)(8936002)(8676002)(6486002)(66556008)(66476007)(2906002)(41300700001)(4326008)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xneZlWGXpqDjTAh4t+aqJCvyPGTLiPAe9OFs3xZKdUap+uAkZumXEFqha4xOnM87BPskRBLvvw1AcUUPlOkfz1ZE3QozUIspg/E7pq8DmaZ1bMiT4JK6y9y0jUmLOmEGEcZC3CXlgi2qdSlMpwEp+nz0dvH2YT9bvNDlEING4aYi8rOS0JHTodvCROw5hw9Yd9pHm/8Gs2Y89DkZ9yoZNhoj90/JGVj+uDXxdaxVp3RVYNYAGkG+e3OAyvj6rpblwsPsZeO5Bydo5VwpzKeS4IpPquiQOJk74jTvSdBnaC1gDx6KicJK/U3HhuOuhRLp4qYKZS2ywhZwms/AuchPU8v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rqkVL8T/gxD/cyUurOeBczEQhNDd0L60fM/loeOPiGvYsddgc+z1Ltt64qeMif9pdpmXHn0Hcw9yPAEWW2VsSuiManzPk6ewFhmzA3gZz1dcR3odLLVQWqPdc/67KJm9HBr8m3c82lLLGeks0pvcdrjKqlWndb3boWKcfAq8xG9RUVeRFR7i/7Pdrq9cKQfHT8KYq5UnONjuwfBMnyxKEfnWTEto+4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b074733-62c4-410e-ef97-08dc117b6117 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2024 01:27:58.8639 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IkDdX32TIJaqiwJ5NkDeocEmsyhlzx/gI//anJWHVDUOVNrbwKjKniYhNbR3tqUBQWRZTvu/nmLLK8p6U6U8Gy+1mC0uZEWu481ZW3eqLZf35Sbx6enmaOBnJoTSFmrW X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8341 Let's use devm_snd_soc_register_card() instead of snd_soc_register_card() and ignore snd_soc_unregister_card() Signed-off-by: Kuninori Morimoto --- sound/soc/ti/ams-delta.c | 7 +------ sound/soc/ti/omap-hdmi.c | 10 +--------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c index 76bda188e992..509a13cc265b 100644 --- a/sound/soc/ti/ams-delta.c +++ b/sound/soc/ti/ams-delta.c @@ -569,7 +569,7 @@ static int ams_delta_probe(struct platform_device *pdev) if (IS_ERR(handsfree_mute)) return PTR_ERR(handsfree_mute); - ret = snd_soc_register_card(card); + ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) { dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); card->dev = NULL; @@ -580,12 +580,7 @@ static int ams_delta_probe(struct platform_device *pdev) static void ams_delta_remove(struct platform_device *pdev) { - struct snd_soc_card *card = platform_get_drvdata(pdev); - tty_unregister_ldisc(&cx81801_ops); - - snd_soc_unregister_card(card); - card->dev = NULL; } #define DRV_NAME "ams-delta-audio" diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c index 29bff9e6337b..4513b527ab97 100644 --- a/sound/soc/ti/omap-hdmi.c +++ b/sound/soc/ti/omap-hdmi.c @@ -379,7 +379,7 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) card->num_links = 1; card->dev = dev; - ret = snd_soc_register_card(card); + ret = devm_snd_soc_register_card(dev, card); if (ret) { dev_err(dev, "snd_soc_register_card failed (%d)\n", ret); return ret; @@ -393,19 +393,11 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) return 0; } -static void omap_hdmi_audio_remove(struct platform_device *pdev) -{ - struct hdmi_audio_data *ad = platform_get_drvdata(pdev); - - snd_soc_unregister_card(ad->card); -} - static struct platform_driver hdmi_audio_driver = { .driver = { .name = DRV_NAME, }, .probe = omap_hdmi_audio_probe, - .remove_new = omap_hdmi_audio_remove, }; module_platform_driver(hdmi_audio_driver); From patchwork Wed Jan 10 01:28:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13515607 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2105.outbound.protection.outlook.com [40.107.113.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 058141C01 for ; Wed, 10 Jan 2024 01:28:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="GQMOZBUF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RrUcs04g2xlnaoPY7WW/yzmhUqJhnEZJFS1bDscJycof0OoGJzV66F72XaHfN9svfIKiDET0xEdnQphmMhuECP1X8r99bXHhgSChDy2Ei1Uxot4o6gpm0bfk7DP4XcI+p/wHA5IR2A0fNNxH93KjTLPbfoc4/s1uUKpyac0ZpsB0rDQmDwSi10kzimgxIcATixo6Aoa15LnmorER+EGkq96JOBoRy4p+Ho3U6iLFNATwemRIEAktKd4pvpRT8R4C1b3WjNvgQL00rvvgY6hf/hOZ9Ddgm686bnUuu3kP8i+Af8gCU6my2al3XfHkyvJNvrwZ/KjoLGhfor4f0Rdekg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E/R2Ml0u4O3e+OPdQgyvOtF/61mvDytmz+g3HZauYYI=; b=QAnkwG1JEV11vjKyvrtpkJ7rl9aIJdHc5qtjz7dIHcPKs1oqszpG8doUqOsRMcdVXKoq1RBL3nJGLzk6QP5WXs5UgWChtMl080zmP+VFwIikvle7TUkd+5synFvdvUlX2C9E86qiSYFoisR+afUdEhqFytJeC1f50Xb+Hf7SDQNtdGjvW2hTSgiEIwfeueTovVRnmJMm5IHi9v0G+fbsLoY1nd6MWO1QWAbd5kKtp9IKYuT6KLGgq7CWul9ljE90prioBD+5Mr8YV/NUmG7ilt/soJ7uVHYgpTdfQjjAwQeS0yWBxvAmkJz1r4Sht5IjYZtvtYTLLZ3n/SYLtCdbCg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E/R2Ml0u4O3e+OPdQgyvOtF/61mvDytmz+g3HZauYYI=; b=GQMOZBUFdaoOHe8hzNxzJI1dnT/zUheyg3QjuMZzUhkJr9mkHDwqZSlLnvKApNa7vtdCAB30brA7WQyBBPwIY8FnZjToXJffb3vh7Apj3fg7NBRPIzo4ei/C5SQHMbEiK3GkGzzOi6NmiGJntVeg1IuAuQD15Hug3zZ80slb64A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8341.jpnprd01.prod.outlook.com (2603:1096:400:15c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.17; Wed, 10 Jan 2024 01:28:05 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b%7]) with mapi id 15.20.7181.015; Wed, 10 Jan 2024 01:28:05 +0000 Message-ID: <874jfmgeoq.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org In-Reply-To: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> References: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 2/6] ASoC: fsl: use devm_snd_soc_register_card() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Wed, 10 Jan 2024 01:28:05 +0000 X-ClientProxiedBy: TYAPR01CA0156.jpnprd01.prod.outlook.com (2603:1096:404:7e::24) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8341:EE_ X-MS-Office365-Filtering-Correlation-Id: acfb996e-711c-488f-c8a8-08dc117b6535 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Nk/AdrKFJlf3CJnd62iRMiQnsuWfw0r277IRmb15Yfg2y0boq2XMKBN/NdIE5NrAlWiey+DaOiaXorNMnImS0Vwen38cFGUaDSBwGi877RNrdi2/q3Dj0WIjGlF4AmGoe6t9KUNIN+7PlUGQrL68qukunddoygb8wbRSyj6yg/7+ybcjw1lJMyjUvkkf9his9DmonLg35/FvuBI1I4lgAJ6qYdrC8z7wjJKUP2yJ/v2vvc7wMrpAzYvYn0rvi1LwtFpMi8GaGsck6i6Za03fEnYh2BwvKUiu68Kh+r9SUkmGtoENL/K2h9zk72177O4svaZY9H3JzFU0g2UjDwRPK5Moa3c5tNgVlnbVzqNZ1C+fF/7ddxWXolS3U5anF9TsjqGT5A7gRNhFHYIgwnEV/qSQmrHZx/GyiX60f1nUKC8XQPbpLqsxPQ5vyhXqoVxkx+snmomhPdEJ/LdOcDyEami5ouvuiJrm9C/M2c4YllIF2LSlV6y3cPX7brYIGK0ujUbYaw26bzWDPdvEr8Yoz8IUTKAovE8Np6lrmu552uKxoT5+GLPw9VsYfuHRfawPfXnfIjANV7Banmh56bqc6QPMZ2Xeo55hJhMdXz3XCnITqSfpXKP7+iy/A1bW4yYl X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(346002)(396003)(39860400002)(136003)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(38100700002)(38350700005)(36756003)(86362001)(83380400001)(2616005)(26005)(66946007)(110136005)(6506007)(6512007)(478600001)(52116002)(316002)(8936002)(8676002)(6486002)(66556008)(66476007)(2906002)(41300700001)(4326008)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1tSb/ozUJCrziBM0Fpjdc8mPay7OO9QQ4wX+AdXsKG3wwpOKrYbB5OEAVdOxwpHPiJl/IldCM57w2DphPwuahwXx6NVdZQS7Ry3Q1GYxVQFpfdkpAAdngUYJIzVNSQ2L1juIuOupuE2rGwii8EleJ+1YoqowTCmW6JMsbaCmTdT/MbKJiBU2GnSorCLvbtMC1Q/GDsIaHJje+yB1+DhN5NmJWDU5HkVYbgUsbaykEj29sHtQqo80rit6Eu/N16JF+Ol5GpSxPLz7mnCwT8esUB7lKIaoy9qqwBVMx8c5oLrpZW+3RIVwDmDQH1Co7Jk6rVIqPLDwlZCECGkdaFJlCI1zKOy9zWuBYC7D3EyQCamUwS2z4XIm50ThgPUZG9SN+NO30IshejV6Ioa3EDy0RPfSXTz07G+OkFaToZPzny4YNhT0iePUsSxMZEvywg6RkXNZ42qjPVv+ry49bOHIqV/DS8dOoh03Db4PlveBut/M8nq4xZFF4EOrmNLp3LO8tU41AmNZmRWU+Zw4YwNaXz89k2mur1vOGkd+l6y/PpzzxEXvI+/dBhzBHsU48CKPpzb5yYiqYN7bSTGRuAxZbQfEraTtU3l+wsgX2mPmZPRX5dze0SxRvefeBcJbGf08LrHKz/wni+18jxZbqUXJRi410FLP88GfqpKPTcZ51jQhLnUupVBqbVhDAKHUhx7xgzVdJNE20QrHS7BL3b2jT10LJOLpSpCwp1xHOODQd1ip+rIpvUy9FrdWQUKzf63tqTgTmuUPdRFuv0DuQfZ9kEI9VLR5gGlMqXQkYT2wnNwRUX6Po5cPOSkt4oStoML0LFrg2Rx8dUrHpqlhbljy/nIuz1GCHpVQRnCqIfaKv+x7q5l9yRJpP19lMwDGIVU1iprEQky+8o9XqDT0ywPEjW+OqUn7OxYP8AtmoOp/TJmSWwaNFO/ebLfgiWb/Wi7n0rmXuk5eHuCPJ0fo0y5KY/KHQgLT516h/Q68cDY6Wn0tMi5T93BEsraRtsC5eOF9aEdpbrOysCy6K4vKeiIK0iYwytW4Ots2b27JmaLdtQlsXt6sTuARnHEjXAHf9MhVDpG90PTHnYgAuWbKW80oOMeCwrmZR+sMK7Bd9+deBds2hdAmgVjrif+Qkl7JCnXmz4cVSEDFgwTEg2HQc39BvXLWWXbyAu2hl8LBjDjnrnsW5e+QjW+L8WEhu977c6D2mCWrxX8oMjd8zvh1q3qHbj5Hl1BMKf+vPtodXwV47OGekLQdjbGT4kRd/6oOftkWWhPaRuwRUJE0C8A5z3iI4R0efXp1JLc/oiCo35FXvV1+GL0PhjhNqGrDz5lCYVEl1HMzRvwozEHZDXeX5i9x094OxLUM6QeA5CfDD3t2jJk9S330OxYDTLLmeYl0mC24xOu/V46d1yPG+if5435e1CBaADuJDdbEU/f1Ht9qeYPRGIwUcUlQ5EYp1+aEAyMmkNk3iETffRpYqBhOL9q8ufNdeZqzPgcrbmvUQssnXOFVqmGCDosFgnkdJytM7XpvpLUzuVM7YOH0tX2JNURWz08OsYdC/k0GMDr4YnHS4C3rIAckn9Yd9+/SeY+xyq7Q7vPNpbzySjnAMMRNg0WDBXhraAfZ8BOgLKnwDOxvnm8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: acfb996e-711c-488f-c8a8-08dc117b6535 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2024 01:28:05.7525 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: saV8EiOqkzLlQP2Ip16yVIivco9BPEA+BTSTIOK+Aa12CgUiLZzUBvLVACqYt6bD8V2xEPlrySxk+XNbDyhEYzkZ6UW8eaycfHPJoivX6tPE82JOWeze0gQyOkQbvrbz X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8341 Let's use devm_snd_soc_register_card() instead of snd_soc_register_card() and ignore snd_soc_unregister_card() Signed-off-by: Kuninori Morimoto --- sound/soc/fsl/eukrea-tlv320.c | 8 +------- sound/soc/fsl/p1022_ds.c | 3 +-- sound/soc/fsl/p1022_rdk.c | 3 +-- sound/soc/fsl/pcm030-audio-fabric.c | 3 +-- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/sound/soc/fsl/eukrea-tlv320.c b/sound/soc/fsl/eukrea-tlv320.c index 63f1f05da947..6be074ea0b3f 100644 --- a/sound/soc/fsl/eukrea-tlv320.c +++ b/sound/soc/fsl/eukrea-tlv320.c @@ -196,7 +196,7 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) } } - ret = snd_soc_register_card(&eukrea_tlv320); + ret = devm_snd_soc_register_card(&pdev->dev, &eukrea_tlv320); err: if (ret) dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); @@ -205,11 +205,6 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) return ret; } -static void eukrea_tlv320_remove(struct platform_device *pdev) -{ - snd_soc_unregister_card(&eukrea_tlv320); -} - static const struct of_device_id imx_tlv320_dt_ids[] = { { .compatible = "eukrea,asoc-tlv320"}, { /* sentinel */ } @@ -222,7 +217,6 @@ static struct platform_driver eukrea_tlv320_driver = { .of_match_table = imx_tlv320_dt_ids, }, .probe = eukrea_tlv320_probe, - .remove_new = eukrea_tlv320_remove, }; module_platform_driver(eukrea_tlv320_driver); diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index 6f5eecf6d88c..da247dc705e0 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c @@ -374,7 +374,7 @@ static int p1022_ds_probe(struct platform_device *pdev) mdata->card.dai_link = mdata->dai; /* Register with ASoC */ - ret = snd_soc_register_card(&mdata->card); + ret = devm_snd_soc_register_card(&pdev->dev, &mdata->card); if (ret) { dev_err(&pdev->dev, "could not register card\n"); goto error; @@ -402,7 +402,6 @@ static void p1022_ds_remove(struct platform_device *pdev) struct machine_data *mdata = container_of(card, struct machine_data, card); - snd_soc_unregister_card(card); kfree(mdata); } diff --git a/sound/soc/fsl/p1022_rdk.c b/sound/soc/fsl/p1022_rdk.c index 18d129c21648..67ae8a335fd1 100644 --- a/sound/soc/fsl/p1022_rdk.c +++ b/sound/soc/fsl/p1022_rdk.c @@ -325,7 +325,7 @@ static int p1022_rdk_probe(struct platform_device *pdev) mdata->card.dai_link = mdata->dai; /* Register with ASoC */ - ret = snd_soc_register_card(&mdata->card); + ret = devm_snd_soc_register_card(&pdev->dev, &mdata->card); if (ret) { dev_err(&pdev->dev, "could not register card (ret=%i)\n", ret); goto error; @@ -351,7 +351,6 @@ static void p1022_rdk_remove(struct platform_device *pdev) struct machine_data *mdata = container_of(card, struct machine_data, card); - snd_soc_unregister_card(card); kfree(mdata); } diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index 2bab0fc1de59..edef8ee8d8b0 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c @@ -97,7 +97,7 @@ static int pcm030_fabric_probe(struct platform_device *op) platform_device_put(pdata->codec_device); } - ret = snd_soc_register_card(card); + ret = devm_snd_soc_register_card(&op->dev, card); if (ret) { dev_err(&op->dev, "snd_soc_register_card() failed: %d\n", ret); platform_device_unregister(pdata->codec_device); @@ -112,7 +112,6 @@ static void pcm030_fabric_remove(struct platform_device *op) { struct pcm030_audio_data *pdata = platform_get_drvdata(op); - snd_soc_unregister_card(pdata->card); platform_device_unregister(pdata->codec_device); } From patchwork Wed Jan 10 01:28:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13515608 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2105.outbound.protection.outlook.com [40.107.113.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E60E31FB0 for ; Wed, 10 Jan 2024 01:28:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="Nh/TqgYx" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GFKepGgk7sdwvU3UMM+Rh1dH8xzx2EjSqL8cuj1MXiceLhrVABkDLXma61lf++VmcVW5Quojd+4NchjOrZZB4ibHrUOnL07DhutmqOFyvWh5fEq1lCAVDWCd6mdmXQuu4tgkzYjVCECiaFv7Xg7oXEmorbL421KX0w6ehrPeAO/JjN7ZcQv5UAMzV9FCq2art9VIf3lq1OS5Fvv4W+hW1t+1aa/dQ5+r2GxWR7DYepLe2XN2M0gx/8T/mc+AGC01T07xcJQuIKAPnDXIVXZDw1BssrlRuoLk9cqgTHxAuJM0I5YHk9ekfdYFL6LHhXyBi07/0HC3fl/2LN2ahfwHVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AMKNKb7/eRewHqh1kCTHijK0/oa5FaqBS/vkXFg+1cU=; b=AS6KEyv9nsJbn4Q8sU/RI73vLKWVx3HD9ZrMN+8yeq449+i2EmtDOfQN8tXKYC+EN8hSm1z/JZk+uF9AMtGx+MZjFUpS9bs0nhuykOu1GX3EdzunNwDscLC5gwgLtP6FeK9iGXO7WZe4Sk7TG9fSP3ItUez6SKxtsZBovYkyozjPOXC6S1l1vedzILexolxUqWrIozt47bc6T1n6y8FHBsoAsUWzYPdYajj8BJQl/jDccTJBtbxbP8Yhn5JpOZnfbN5LCnyblyTIlwtdYvw+wM0FZj7dWS+A5VJpisFZqRsTe8sezdtz+1IqCr1Q18wJISUh9e3WmusNklaPpb9fHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AMKNKb7/eRewHqh1kCTHijK0/oa5FaqBS/vkXFg+1cU=; b=Nh/TqgYxQRUdfH2sfx8ikJZW64G7pSNaKlVVJ3caPIeTYGNSOkUt+pOy6RoO+QB4OI6SjcriDCSSi6nQfvTqNgrcQEHSB87Kh60N1AbDA0fEZqEO1yQyooCgY7WifL9U8miKfbeFIKke9oFDBQd+ykQHOx4YmU9+4RZWnssTRSc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8341.jpnprd01.prod.outlook.com (2603:1096:400:15c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.17; Wed, 10 Jan 2024 01:28:11 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b%7]) with mapi id 15.20.7181.015; Wed, 10 Jan 2024 01:28:11 +0000 Message-ID: <8734v6geok.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Alexandre Belloni , Claudiu Beznea , Jaroslav Kysela , Liam Girdwood , Mark Brown , Nicolas Ferre , Peter Rosin , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org In-Reply-To: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> References: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 3/6] ASoC: atmel: use devm_snd_soc_register_card() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Wed, 10 Jan 2024 01:28:11 +0000 X-ClientProxiedBy: TYAPR01CA0166.jpnprd01.prod.outlook.com (2603:1096:404:7e::34) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8341:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c94e2c4-2adb-4222-6af3-08dc117b68dc X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ao5Rnq+vbrPpaTpguHuUVPAbKrgm2a3QxAOzahbQ54q0whVqSy6jHn7Md5n+5lXf0c6QDmeuhMprUv1+QXtOgHE5/0s2Ru5zzftm1HTTv9T8OuZSFWCh+8owavmXwA7cW/Qg0H++2Y2v8la0krnL9+HJWpzViesI52LxXmVoJpbU+wWN/VbBaqw09tTH8hkGFYgDLY8H2rD4asP5e//+9CE3ZaGz0UjlgSprcdSgwp9OAetszYMc68Jk5INuxeSF7xhyhCRM4O3TsfhHxJ/3ZQemXKMt/O1Jm5uZ1RBlgfZKZv/n0lJYrcLWNd8pG9pSJfTti50kdKQbK0ZRk850chPT4UxGdwJ7KWXKTcJED88LZzWf1XtE9LL6GogtpE98w3zp18bYJD5o6Uj75TQ3k/8Nt4PdOkd2R/Cd0AOAMi7fSGOOg3bOJ9d2P0YGS6TACMv07f9G/+0uwRRUPf9eqa4K7cb0Q7JWA/0db1ugzuBU+yewfc2JnjL7EaYubL6gW+P8c2wJSW5U/UCiW54SRdccUyGZMtUazD0wVJsca9ems1CzcwMzJjpIXD3lL/DX07RhC2wR0Wb9F6PkcuRmHgUcK55QpWIMlahO4tzQmHs90Ti9qCE9yLG6VGxuBqmD X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(346002)(396003)(39860400002)(136003)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(38100700002)(38350700005)(36756003)(86362001)(83380400001)(2616005)(26005)(66946007)(110136005)(6506007)(6512007)(478600001)(52116002)(316002)(8936002)(8676002)(6486002)(66556008)(66476007)(2906002)(41300700001)(4326008)(5660300002)(7416002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C1LFpdXPfc3y6vNAOqJ7kQv1bgijUVh4TTKdrDzrV/s8MlcBIFT2j5kA6yAmpQCvaZNH6yxSryBu13rEISTBgJ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ExZvIFfqJgJJSfkxqsXA4eHxwy768IboafW7DEbimSBZkCBBo7oEHeKJ0BUnCUxUIdwnG0585oBHBqT31fE9b3Izs5FxLUEA7scdrxECKyzttyu1M1bP77YojxWRhz6S9JhCAdZ15reD9RF9c4vBkojuB8gzhQ8tXyoenL1BA60zyZ/SGqGxXtUcot9c7mbt4vr809/Cvv2AfhprSreOH45vrkwpuJxj9WUauqcysv/iu3wojuOEudLNP6B+W/tvpZR6P7FFWqbIjUaIIZALKNqWMgWzdnEli1nPiwpELtq4gqz2ipQOt4A/cifM5U1LjVt7/7Gmn5ahl77sBFTqWYXvUS9gXNq0ZEk9OUC7hHX8JIEKhUHGSQUAxKDv5VwN5y/4kSLfjZhPytkS7RQaHCFrfb9m68MqKd8uNBjyotDkNBZMuCO50pVUGWfqywp6Bj4qtb4GkVsrap+j3DLo= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c94e2c4-2adb-4222-6af3-08dc117b68dc X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2024 01:28:11.8736 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /esQ3XBRRuT8vcCKAdHEC0u4SkKXXOhV961V+oAGiIzjx9yXzdM9zLbFqaovePD8mwoOkXeCHVoTbVlv6bI6ORrCdlSkMG8nXocQWFB7rkLblp+nyKQELPJ4yNodrd88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8341 Let's use devm_snd_soc_register_card() instead of snd_soc_register_card() and ignore snd_soc_unregister_card() Signed-off-by: Kuninori Morimoto --- sound/soc/atmel/atmel_wm8904.c | 4 +--- sound/soc/atmel/mikroe-proto.c | 8 +------- sound/soc/atmel/sam9g20_wm8731.c | 5 +---- sound/soc/atmel/tse850-pcm5142.c | 3 +-- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index b7f16ea0cdfc..d4339145e6ca 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c @@ -147,7 +147,7 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) return ret; } - ret = snd_soc_register_card(card); + ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) { dev_err(&pdev->dev, "snd_soc_register_card failed\n"); goto err_set_audio; @@ -162,13 +162,11 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) static void atmel_asoc_wm8904_remove(struct platform_device *pdev) { - struct snd_soc_card *card = platform_get_drvdata(pdev); struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink; int id; id = of_alias_get_id((struct device_node *)dailink->cpus->of_node, "ssc"); - snd_soc_unregister_card(card); atmel_ssc_put_audio(id); } diff --git a/sound/soc/atmel/mikroe-proto.c b/sound/soc/atmel/mikroe-proto.c index 18a8760443ae..8341a6e06493 100644 --- a/sound/soc/atmel/mikroe-proto.c +++ b/sound/soc/atmel/mikroe-proto.c @@ -140,7 +140,7 @@ static int snd_proto_probe(struct platform_device *pdev) dai->dai_fmt = dai_fmt; - ret = snd_soc_register_card(&snd_proto); + ret = devm_snd_soc_register_card(&pdev->dev, &snd_proto); if (ret) dev_err_probe(&pdev->dev, ret, "snd_soc_register_card() failed\n"); @@ -155,11 +155,6 @@ static int snd_proto_probe(struct platform_device *pdev) return ret; } -static void snd_proto_remove(struct platform_device *pdev) -{ - snd_soc_unregister_card(&snd_proto); -} - static const struct of_device_id snd_proto_of_match[] = { { .compatible = "mikroe,mikroe-proto", }, {}, @@ -172,7 +167,6 @@ static struct platform_driver snd_proto_driver = { .of_match_table = snd_proto_of_match, }, .probe = snd_proto_probe, - .remove_new = snd_proto_remove, }; module_platform_driver(snd_proto_driver); diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index d3ec9826d505..8046f7a977f6 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c @@ -171,7 +171,7 @@ static int at91sam9g20ek_audio_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_probe(&pdev->dev, ret, "snd_soc_register_card() failed\n"); @@ -187,9 +187,6 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) static void at91sam9g20ek_audio_remove(struct platform_device *pdev) { - struct snd_soc_card *card = platform_get_drvdata(pdev); - - snd_soc_unregister_card(card); atmel_ssc_put_audio(0); } diff --git a/sound/soc/atmel/tse850-pcm5142.c b/sound/soc/atmel/tse850-pcm5142.c index 611da23325d3..f280ec597a08 100644 --- a/sound/soc/atmel/tse850-pcm5142.c +++ b/sound/soc/atmel/tse850-pcm5142.c @@ -398,7 +398,7 @@ static int tse850_probe(struct platform_device *pdev) return ret; } - ret = snd_soc_register_card(card); + ret = devm_snd_soc_register_card(dev, card); if (ret) { dev_err(dev, "snd_soc_register_card failed\n"); goto err_disable_ana; @@ -416,7 +416,6 @@ static void tse850_remove(struct platform_device *pdev) struct snd_soc_card *card = platform_get_drvdata(pdev); struct tse850_priv *tse850 = snd_soc_card_get_drvdata(card); - snd_soc_unregister_card(card); regulator_disable(tse850->ana); } From patchwork Wed Jan 10 01:28:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13515609 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2120.outbound.protection.outlook.com [40.107.113.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 589F11C15 for ; Wed, 10 Jan 2024 01:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="D5MZhKps" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KdQwcn3H9Y7FUEievXdiqnCdG7ylvEZm095XBHoD2oYY1MvvKNJSKi8iy+hwrmGvWKDq9XqopOrr/xF2wpxZ3xj7acbVSZNYB1Dj6oBFZz0WYdikk0Oe3JqmL21CoS0mqbITiRZ5e7UJYOkmEkY/g1fFNNqsmNW3smj0kga5v/IKnlhI3RmsfznHF5w9Rzsd9dq3gZCGgaMTGOk/8Cnmx3BsfuLwFd7HK5e6iYX2F3fQjvP7dul7Pmg79VTVSxcXjvl7a4pZr6aqigywM9q23Us0qL56VNXV4TPHAZ5ksUuKHMYbNKWFIUThfarXJkIrBUhW5IhzFyb0XDuP50IfjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tqj65RgyW7bJI+idL+WyiS+7AXJyjx7BF3Z9ipNxKVI=; b=jXcG7tbkxA5eeDbzj7Ihw2zZuhMQ95Pr6Mp6teoyfbxbQCEdf3kCE6eguCo5lGuuykjfsMrEEyPYCUZrbj9lGhfUqPXxWgKqfbsdyegWX2514rnNfSLdvVmTYY0IT3g3TsEpcRueCJTPsMCY3gkkU4n5D493I1c75q/TXFxkKkCg6hvvAneeCmNfq+HSnqHzIEJQx7bIC1UFTCunXac3fXUxe0fvKiWJ31KqLnJTZknDjLlR7AAxJWZ3eKAJnbgkfrHPZsauIkLH9hLTUdGXUFlp1SnbdHvBhZGB1gpVAW77WIfeNns9n/kW6zV/cQPZfQLoSzM7vmIffhlvXXSDmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tqj65RgyW7bJI+idL+WyiS+7AXJyjx7BF3Z9ipNxKVI=; b=D5MZhKpsY6jvJPhdFzfXvIXbXNJxOvtczdBCuacAI15wfLjRjb70o8Beb2eIkKvDULbItPzrHm4OjnJP2tbenVeDgxrJZQAeBZHhe+SM9aTPjAWlnietqF8cYx5o5MoeG+uBqpbJL77qdTTCzMpmcO/uh1ASCIUtnCaRWXAD1+8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8341.jpnprd01.prod.outlook.com (2603:1096:400:15c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.17; Wed, 10 Jan 2024 01:28:17 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b%7]) with mapi id 15.20.7181.015; Wed, 10 Jan 2024 01:28:17 +0000 Message-ID: <871qaqgeof.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Chen-Yu Tsai , Jaroslav Kysela , Jernej Skrabec , Liam Girdwood , Mark Brown , Samuel Holland , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org In-Reply-To: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> References: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> Subject: [PATCH 4/6] ASoC: sunxi: use devm_snd_soc_register_card() User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Wed, 10 Jan 2024 01:28:16 +0000 X-ClientProxiedBy: TYCP286CA0206.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:385::14) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8341:EE_ X-MS-Office365-Filtering-Correlation-Id: fe43abf5-f5c7-4421-eab8-08dc117b6bff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zez8FOLYbyb7T9C8zDKtWf6HSlRJ4LziKD/I3Gt3xfjLLu3uDqq1R2GqjbMFjMIRs4ULz1gzTnPdyl7HE23KR6OW2Dm1Mdc3R4LtvofSMEDTl0JjzX2Pk3e8eJDk0kXxeyf5bwph0esMXqG/JN2s2zwdtDn3ATSQ2UiyJe6ziQDsXcV2rIxSNO79c8AtabUc+2HM8hdC80Z5r0h8w1ANTsc4xgJKf9HgE9pDt9UPg5KoVp8vXGDfnHP598yzrNAhXmtkKQZxJhO93KKkIPqB4PmdJ0nO3stIh5NMYiucG8ZTzGhPUlaukwwwTpNm5kkXVQPo3kciVGi+YOZ1rxbUxCC3H2XCzSQtxkYt/GaxDeMsRITWe6bl8faslPz4YtZfeFOwhAIwjr3pnFVt7irulqIeemz5dnr/zze0qATxF/MOxH9Mw3loHl2qohHXn8GQhLxdRMUm3PSnXKHwndhWs6ec+5tNxN4sXxS+2Auc6Lk15efd7kq95ogkXsP7mYVjU6ITPw7EWm6UaB6MycFjmqRRgvtosWiD0A/xeGhfl//lgIUnhrcu+iJOwNkTeBZsFkoTxiGfAqABnFaepCwrftrKrFuqP8mDhrNsf/596LtNTB07KQChJN5loCczieh/ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(346002)(396003)(39860400002)(136003)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(38100700002)(38350700005)(36756003)(86362001)(83380400001)(2616005)(26005)(66946007)(110136005)(6506007)(6512007)(478600001)(52116002)(316002)(8936002)(8676002)(6486002)(66556008)(66476007)(2906002)(41300700001)(4326008)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JruDj0dCWtd5tBRGrcHklOY0IKoyqVXs9Ier4ZEMb6eS0lVahZIppqD2MI59jJfanwQtUeoDifaTj/CRXFAiF37GucXghjcXV7NRQWH5gM0z4s2ssYzEerYohsryObEIls9RKNZW/yDB7JyJzQLHUlY4hqQR17ch+lec/df9dXdVrCBK+4xgmSbGvkVvQY6zJYVsLFo59AcOYu+qpZRtWSlXPQBnoog3qcoMHtw8cqJOZXUVg5Ke0MqmYrymJPI0U4XVySoOXpGBMlk37BDjle0jdZWc/idZdFNlpXs3deeDNThjue76qs8XnAQ3Zkif0dXaqXZKfpVKyOLk7kMOFZHC87x+KKEBvWrRat2HNBEFWMNvcbuRmYjq9/StVLp/TaehfnD3EGPghT1xYlV29p8N7kBGJ7HeFFtGES4xrNIP8WviKjOXdPubPrrSXyzDuaY8YM8V6XoYJ4sY/K1PWy5A7zS7KTUvnQvCDQ1dYxlNElV4gnmiRIQHraB5KCmkUR1py7vpvDXztKFV2Mhvt4fKO9h1rp+ot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AY0fghzPtbDhpRyD9bUY= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe43abf5-f5c7-4421-eab8-08dc117b6bff X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2024 01:28:17.1428 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: D0XbjEqmTUwP52BzHC9p7TJfBGvvYW0b4IFS6MWpC68AhBOT6lK0mr9BtsBHEgMAyrHtkC8zr7VYo2eHrDWwyM+uMwtWYWQosIBGiKBE0lNdoAxLjGNTVEogsz6Yv2ty X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8341 Let's use devm_snd_soc_register_card() instead of snd_soc_register_card() and ignore snd_soc_unregister_card() Signed-off-by: Kuninori Morimoto --- sound/soc/sunxi/sun4i-codec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index a2618ed650b0..f278f51ff68f 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1805,7 +1805,7 @@ static int sun4i_codec_probe(struct platform_device *pdev) snd_soc_card_set_drvdata(card, scodec); - ret = snd_soc_register_card(card); + ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) { dev_err_probe(&pdev->dev, ret, "Failed to register our card\n"); goto err_assert_reset; @@ -1826,7 +1826,6 @@ static void sun4i_codec_remove(struct platform_device *pdev) struct snd_soc_card *card = platform_get_drvdata(pdev); struct sun4i_codec *scodec = snd_soc_card_get_drvdata(card); - snd_soc_unregister_card(card); if (scodec->rst) reset_control_assert(scodec->rst); clk_disable_unprepare(scodec->clk_apb); From patchwork Wed Jan 10 01:28:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13515610 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2139.outbound.protection.outlook.com [40.107.113.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40CE723B1 for ; Wed, 10 Jan 2024 01:28:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="iiw4ym2X" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c0eVm6YiWGA07BlY2YHgMLNEyDCjdHVAoYR0hUvBRuv367nD0DrB8Zqbx7vW0XJeDmxdLPoZgYp9kCHojztrlcAtpGSygfAU1PFcqPEEF92nocuyL7e/8XHimRfgciyxe+XH7d5R8PEL97GsLlgGgnzcYyg4pfDcmjW6iuCKmvDl+7E7PKs+dft5xZ1qS6ZbL+IXmi5YaN/1wQplqWrN72YpXHtB31bEcj6ElxwMToMvgV22cbT10GAKzxuhDW7WD82FfmG7FuTm66cYtyF4xT10UuxoELRe8tPYGn3O6mb3H2ULZ/UXyadd3/udLR9zr5RRFyBXXATeoUT8ldVVxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wAIa4Kd0pz7d+chRoOgVwcxyuSeo9hdyZ5YDsV4aWb4=; b=ImHyvtvCk9G484e91utEyduMmGUlsm8x1LmNdVoTPH8J0/zf795KTVJLa64qS7bA1kUCoqXnC8DrYc3eOBzfsR60rklQdApy+o+FBKhxUlSbC1Ah/CeCPV2ikT8C8NpL8KABsiJafYWIKzyaB2DUz9zdMRapy1M5PtRDEkTmupC7zte9q071kJE7q9/nkCglaTEhcfOkxTOq8Vemy6tOv/wpE0mzPI3ipL46+Vu+YyEU68xFlmnzqiXaJCRjnqDrFMrGCy1ctC/dJCzsdgiO7SMEaGrVNy8V8g4id/qo+enceaBeirow6qtTEi1bjW3sO2nHxN/OkkCNaI4fj9W73A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wAIa4Kd0pz7d+chRoOgVwcxyuSeo9hdyZ5YDsV4aWb4=; b=iiw4ym2X2EFWPVdNnG6FtNk1K5nmGFW+TRexdqfoqVBQfuZBMyucGRrkAhmyy8CFA+cf26UgXrqIPJ+oGLdMWbI4rUe5Vz0GiC99s5uCA9PXqp5GdloWGbivoSAbRCfFJ1JbYRtocvY96QhkNVI4OTmr3yPHnepNB4Q0+tlFVl4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8341.jpnprd01.prod.outlook.com (2603:1096:400:15c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.17; Wed, 10 Jan 2024 01:28:22 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b%7]) with mapi id 15.20.7181.015; Wed, 10 Jan 2024 01:28:22 +0000 Message-ID: <87zfxef03t.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org Subject: [PATCH 5/6] ASoC: ux500: use devm_snd_soc_register_card() In-Reply-To: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> References: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Wed, 10 Jan 2024 01:28:22 +0000 X-ClientProxiedBy: TYCP286CA0327.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3b7::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8341:EE_ X-MS-Office365-Filtering-Correlation-Id: 257ea162-928f-4c6d-5651-08dc117b6f2f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j7z2Mhx6U94x7pWrEsNmj3VTZVDKZkd/jhlxF4CIzqqY/SMG/eB61Y+ryiPNuyDCceb0u3VW8Aq8INI1lOLBf12Hdiiod6p9OUCJKBO47sgU4sLqHSZ+V/Ux7ZJSVjOmh0nkpbZR3fp0u4QmY//D4xHkgYU8gvLm6elaJOtREJtXMc8zfBl/U65lgWAkUjAyKhGfCWau4CQpxkpFKbJMZChdNFmi32IVv8QQ7Yl5v6r1LLsD7J4uOiTQKjBWsPLqWYRuHR5FBUfr1ZXO9vFd+LrCbRXXbp2bnWDSS11Od9lrTUVKXME7UEQBR4O65hP6F9gCVRP6z7BvXmBKm71211pfm1RobF0ks/aAZyHSuH75kVB0zfXckS+e0NXalBgzrmhb5oyhPdd03N31KX59eNvx4QvfNKxDHjlwSJm73DTg/2D5ufUIIZRYbj7rxOKG9aSCZWPIuwoiB6XQTD1HtWihtv/XEITL6FmJRbt8XOgFlY6uFmpHmbmc6F80HgnQUiMCWE4nVjLRTalTF+2PMoqTdbsv7UeJ83Jz6/Dlb+WLqjTm3gJBucPcySM6hV6nUKanavXyVBzXR3YWxNMU68E8+VYK9g3KUqoThLPjCOVMlV46or2gFGl6MNANRLdl X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(346002)(396003)(39860400002)(136003)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(38100700002)(38350700005)(36756003)(86362001)(83380400001)(2616005)(26005)(66946007)(110136005)(6506007)(6512007)(478600001)(52116002)(316002)(8936002)(8676002)(6486002)(66556008)(66476007)(2906002)(4744005)(41300700001)(4326008)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: g1zniObzHm3jvFy1i9MvMxiaETO58X8TY4K+mGs1B17rQzGTFkH6STVmbB3fjWe71oU2y13MtgYUosJYYKFqjsd2wTg90GLRFnh+T/7/UDXmpteXNHBJ508BQxuQMJl/rCTi7eAaWg/Ri3Zh7rpD9/TrWSim8BB1epsZh7raqzKBnhvWq/dCb2zdSXpu8m4rPo/aH17HCcA59zBjG6MmCJvfaOOk5xhac07Q4kRNpNYNFfRVlBB9fBlOZZdazGVnNiZm+bsvIWntrmYxjOMGO1yRaS1IicTyLKGkavG+j0WCmmb3XWi9mggACEtZAwKWu+6pBQ/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ta6DW9xJwxQoUfIcnjVxwmaAUJWX5K1bICFIkQMemBdte5lwjRueBc5q4eHlUL9nEjrQOXhSsttNENDEbcpiE2EiyKfV3ywiflkDOljlTTOCKbtahDnh7xgaas8G/w0aGW/cJs7C5erJBT/tUQopDYBnhK5c/RH6k5XtCsrx5VaBpnH77ECdedUuVHsL0fUKug/nEAOUUpU9ZN1O7AV81s6nlgi6Mqw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 257ea162-928f-4c6d-5651-08dc117b6f2f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2024 01:28:22.4925 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wjnvi1BRyZY0P4Tcl6pgG15lQy60xRZu0MhLl+YAcJy9uj47CEXFpuHYT49ZMBNknXD6UJIrsX1ezvuS5o/0rJX7P1z0BEiUqT4LqKkgXh+IDx2Q5PPFOV5jnIXo7qP3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8341 Let's use devm_snd_soc_register_card() instead of snd_soc_register_card() and ignore snd_soc_unregister_card() Signed-off-by: Kuninori Morimoto --- sound/soc/ux500/mop500.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index e0ab4534fe3e..1696fa80b11b 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c @@ -126,7 +126,7 @@ static int mop500_probe(struct platform_device *pdev) __func__, mop500_card.name, mop500_card.dai_link[0].stream_name); - ret = snd_soc_register_card(&mop500_card); + ret = devm_snd_soc_register_card(&pdev->dev, &mop500_card); if (ret) dev_err(&pdev->dev, "Error: snd_soc_register_card failed (%d)!\n", ret); @@ -140,7 +140,6 @@ static void mop500_remove(struct platform_device *pdev) pr_debug("%s: Enter.\n", __func__); - snd_soc_unregister_card(card); mop500_ab8500_remove(card); mop500_of_node_put(); } From patchwork Wed Jan 10 01:28:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13515611 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2107.outbound.protection.outlook.com [40.107.113.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CD3723CE for ; Wed, 10 Jan 2024 01:28:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="fJiqHbLu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WY3nyZ1N8MnEQRgvzsv429g5AxKcs8l+J7gzZMq1KJNtcKSmNtBqnrX5m3rjgL/LyAfwRBZlps8WGm0DGYC8ihEVLg4xsXXV+PuuaCb5C+0cTVDsdlJEHng2vDpXmnbmkfTyfzY0F122LaGGX3FIpueFFXq7KYlh2K3HHzgfSUYgqdNMRHTLOLqgVTC14U7hdglo/uMmlCFxMG1CBrtJQnM44Tztnn+l4S1S0+ow1reJ46niywfFFMPwzyAEiqYIsMOvy5h3RBmyrZwDvN+L/F+b7oysFW48gFM/BZtp/gha1wXkHYDgaLcTcMFLBRdsP6UVE2a5cTk69FtuON6Byg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2IUyM23PmUoT9MSPiG09dFBkFBMHSWXfMA8o1pe1uF8=; b=g4K9L/xo5yK1jzVhKniC8vlzffvj8+MS8SwUcXtF/IY7Zx2fUw2vVNeg7Y1IAVvRKIBr2Xc55+PrQdANsbNXdwTIuKuhtEgOl+tH1BBJiIaMPubRdGa/ShpTfkOz5eTAbINLpZOlSEB7li2ue6zLJWHqvUKvytx9rACEtBfkmBwTKc+EJi8F3huWOe1qrC7zIfK2R44pe5Q3OmVoYeeoGrgHAPm3kijtqlAHuJaBPU1U3GBNnm6n5Hcmn3uFGbsfHl93zb4Ziavb9vBEuuwEgrun00u/83sRZicbMv1+nrxd+noAa77DUZI7abHG5R8QI8KdRVMjlDRX7VC/ojIkMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2IUyM23PmUoT9MSPiG09dFBkFBMHSWXfMA8o1pe1uF8=; b=fJiqHbLuKDUqrEcnwdCK5qPji6RVEzc8tYeel+D3xChHKRAbg485D/kNDjV0KrZEM5sR/sTmkwf5gTadxFJ5k5cMSMxhYQOWdIROeABEvU8x3vj9P0lfqMze380WCtmO+gp8nIB/430S/34ZbtoI8ZcgshJstQgr8qc596+BO+0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB8341.jpnprd01.prod.outlook.com (2603:1096:400:15c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.17; Wed, 10 Jan 2024 01:28:28 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::91d:1bfa:edc4:1c5b%7]) with mapi id 15.20.7181.015; Wed, 10 Jan 2024 01:28:28 +0000 Message-ID: <87y1cyf03o.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org Subject: [PATCH 6/6] ASoC: cirrus: use devm_snd_soc_register_card() In-Reply-To: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> References: <877ckigepg.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Wanderlust/2.15.9 Emacs/27.1 Mule/6.0 Date: Wed, 10 Jan 2024 01:28:27 +0000 X-ClientProxiedBy: TYCP286CA0015.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:26c::19) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8341:EE_ X-MS-Office365-Filtering-Correlation-Id: cf0ddd40-949c-41ee-99d6-08dc117b7276 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ttVWvbsKvHl1UP4wEWmcB34+JsEia6ftjSDfa4FbFIw7Qo6cvw7m1UolYvvKMHnedtLlKAErxLCo5UZ8k5DTIaTAn17d0D4VsCI5y6pztqn/QpkSvnINf5/E1y0UHyd4ZO5f8U9occOMe4azKtJd+eyVVOZTy64P6TJUP5E3lY2KeTH8NfcYIir8lIKnsfnMdLYNdhuLX07N6ivNivnfSewJZQ+qA9YGq9Mkg+EqDzutGaFj4mDMKTTitPPh43/xOt6oX5oKacolQENunUSKBak5eAL2RTsQ8vJeiLp2hyxluyu/anbLWpVdnqxxA9tcJ1FLvIrquyxZ9lxKqISIVQmBsqSdT5fG2CiBMdBHl7XZpUHFKdqYxok/Zrz0/DnrEclQDOXTgNKWdzemIXbYofxnfwyAWF7l49lhuVAKQyvI2pg9jvdEjlGI/zJRVLUFWvHWz77uJhzHoWYrjSx/zO3C2ZgW2XNFBpnb6/D9GK/N8lmq6S2OKRlvaZ6zNH7/hyHUPp3jp17nzruIxFj7rGVjxlg9F0okl9EM1eRL/vf7HRygpKbfuE1sWp2XmcbqBrFD+zSUpdfX6BGL030g9FVBjMKPCZdX18FaK4j3Lj15sYhEhS9tvDBPQtt/vMVi X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(346002)(396003)(39860400002)(136003)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(38100700002)(38350700005)(36756003)(86362001)(83380400001)(2616005)(26005)(66946007)(110136005)(6506007)(6512007)(478600001)(52116002)(316002)(8936002)(8676002)(6486002)(66556008)(66476007)(2906002)(4744005)(41300700001)(4326008)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1CrmEeDPG2LQWNGsIMOfXY/wWk1TIC6fFzSTJfTbt8QeBn7rmsxgMMTueV+loLsd4/NnI38A0GPx1QTBVQSbcyhGp18thNjl0k2URYVN/CPLqUVutreJ8Me0ajcQdtxvawTSgL/X4SlhYx7nx9bpo8u0k98IuiRQarW5VBWiuETKhgDqSSca1ied+xPXBfeanhk+KkH9G+fet0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NnFCQzLb+lnVg2YTk7y0psCLx3UP17lYWcqMfCLcRxtyZDQzrqzR1E5XHk1munCTJ4z8QDDlq11ZWYiZT0YdnKtbZ2UAcEez1Lro08B1GlBP5LDypWe85jvlRFXu93HlJzfvTggHpPgLTnhr6lPFrM1DnF0/mnUAJNz5CKDg/8boSxyIG/jH93RaT9xP7uUnoYZkyIevpReX/5Pis0xy3P/9Q13PzPXjoOcxYd7jdrX4nMZHwJ8wmaL3/6OBDsUNQ8mcf6CKA+9gZ1Zlnc/lSxSbF2bg0d/KQiR/9jLpJcPujRWMGR/DNuFOvxmbglwT022GuPn3T207VIJurlmdFxZNLcVV0UrDhlIdWdqfhs1qNysRyj3iVAlBIg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf0ddd40-949c-41ee-99d6-08dc117b7276 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2024 01:28:27.9893 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 75h9qg97397z6o4Bkg4ITSi45FA9sZrhXcOS8Jj56GYLsdolKII29wIx1PU3tJuPNYDPfLQcTbTkYb243056C+bk0y46g6WxBBUGOrIWt4l19+S1sPtxe93JxQT/mSTB X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8341 Let's use devm_snd_soc_register_card() instead of snd_soc_register_card() and ignore snd_soc_unregister_card() Signed-off-by: Kuninori Morimoto --- sound/soc/cirrus/edb93xx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/soc/cirrus/edb93xx.c b/sound/soc/cirrus/edb93xx.c index 8bb67d7d2b4b..146ca2468bad 100644 --- a/sound/soc/cirrus/edb93xx.c +++ b/sound/soc/cirrus/edb93xx.c @@ -82,7 +82,7 @@ static int edb93xx_probe(struct platform_device *pdev) card->dev = &pdev->dev; - ret = snd_soc_register_card(card); + ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) { dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); @@ -94,9 +94,6 @@ static int edb93xx_probe(struct platform_device *pdev) static void edb93xx_remove(struct platform_device *pdev) { - struct snd_soc_card *card = platform_get_drvdata(pdev); - - snd_soc_unregister_card(card); ep93xx_i2s_release(); }