From patchwork Thu May 18 01:40:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 9734829 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C3E7601A1 for ; Thu, 18 May 2017 16:58:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AFC128898 for ; Thu, 18 May 2017 16:58:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FE61288B9; Thu, 18 May 2017 16:58:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D63E928898 for ; Thu, 18 May 2017 16:58:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 005B26E5A8; Thu, 18 May 2017 16:58:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 730916E108 for ; Thu, 18 May 2017 01:45:08 +0000 (UTC) Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 18 May 2017 10:40:05 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id DF9CE63830; Thu, 18 May 2017 10:40:05 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.38,356,1491231600"; d="scan'208";a="243297187" Received: from mail-hk2apc01lp0213.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.213]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 18 May 2017 10:40:05 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=V8VfsGirIBM6StJQkHUWnkdUHZ+Kb52+ArrgOtnnlXE=; b=isitUVu0bvEcgVIZndqIRqGM7XLIIfxazGO6p1vgkf8MJpqLdNNRUf0pqju0GIL/yMrTYEyD0HcQnZfzmBPsgE6ENFnNHEKXB+WTR8Z5ADTUY6YkDIj9epnXicixvCbT8D3d7nQqV2nMkazpg6ml7QCgppIJ1f6hJu5/DuydP8g= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by HK2PR0601MB1873.apcprd06.prod.outlook.com (2603:1096:202:a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Thu, 18 May 2017 01:40:02 +0000 Message-ID: <87a86boskr.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 3/5] ASoC: hdmi-codec: remove multi detection support User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown , Archit Taneja In-Reply-To: <87efvnosnb.wl%kuninori.morimoto.gx@renesas.com> References: <87efvnosnb.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 18 May 2017 01:40:02 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: HKXPR03CA0013.apcprd03.prod.outlook.com (2a01:111:e400:a428::13) To HK2PR0601MB1873.apcprd06.prod.outlook.com (2603:1096:202:a::17) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HK2PR0601MB1873: X-MS-Office365-Filtering-Correlation-Id: 5809e332-148a-41b0-2063-08d49d8ecdf7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:HK2PR0601MB1873; X-Microsoft-Exchange-Diagnostics: 1; HK2PR0601MB1873; 3:vu4rtLR3HfzPoOp6yaU8mgPMVtC7N/Uress0cLL8wsKXHL2JoUEZJZJPJ2a0IL5SF1nkDwoKWCVTfXFbioy+ab0n5DxyMQ+2EjWrgAtOpgJVGr6ZcWTCE0OW2SkYDqbVob97oeOKF3AsxU+brvlmHHP8h/if1w4GjTIWFN961tXyp4a9eGErGw9V1p7erpWJ/iBkWsJBGX23NsKSt5Zmp9/yitfsWiBZRx5+5VJuK1ArTM7kUGCokivhda9FlRfOMqX70Uzi75DMmjm6zg5bj4/z9F5cs4UxMjywTt8fd+pBT6h3JmyxeOnOiOJYum9TnZsBo0F8D9k/iet7+JxJbGHXEHGEGrAE0A0vF3+C9EI=; 25:QvGnUXz7yU7dTvldULTV3BWMi2xqtPSvbTGPZXBV7xvMIp2QQJHM+RYzAGbhqmCQf3Oy44VE8t6XKlRjgyZwYs9QrkrUbfPsLJJBSL9ZkZ3GycyD0/H+W4+jiztcbnSL0wIqSsfun3FMArv1J0DCucJtAXGC6g5wXNnJwl6pW+Hr08Z69ns48YzNKibpJ2X5d4zwYwdAfq2RmFdd05m2oPuDZdcDVnDgLqDwPMpHqOOs7D0JmKxZLBTuw1y8htZOts0KJaVzhE8T9LnqjfVNqubH2nBM/Y5MeHA4mFWe5AWPnfSgnffoKnz3bIRfmRzuoRSRWQSVoVor3NmjFfP742vl93WCUokAu8kStl/RYIZzIW0BcCxeMJgMdQOB9VJsGgMFoY21L239RynyIVCWAgBW0N2+HBQewQHGnekTwPa3qyOyaGRL/ms/eQBniZcacTE4T6UAV9n8ss/tweEWulZnLGlZDAw+xN4rwLUIXMA= X-Microsoft-Exchange-Diagnostics: 1; HK2PR0601MB1873; 31:fFKXnrY9D2fksg8H+zTM9xqTrdPIKVX/IM7jeuCgolY0I85TZAcd4IqQsUuH9qNIW1oBgklacyJBDFkZew2Mr/6mNKV54rTvIhNeJrYXaeE75RAG8Uto78CajpKj7By8rckYUz5Jw9K5j+2zmkpQCWcFSGZEbRZqLGrDEJpKyf7LKeiTH8Rd28wgNeqgLERfdpI8n4+rbVww0+gInFZ7yT1vG32JzFDxI2X7kZK0+Jv2GxQzjZB+KQurbSVVa6hZLQ3Q4r5xzLZI1JCh5ETn2g==; 20:udNvYM9XT7njnoFUSMme9xc++ewfTTMdGdHNcZlFm6VDIpphNaBpzPLq5767ElEd1Zdw1npBX3t3nK1pb36dDnDHNJTG4FYOWGExBWozBoQ87LZPxlZm9PbK/cSvOsLNn+3+/BtvruCjwTgTvO+iRqwRwNIpRQokCnX5bwu/kJt2Wns7bu9Mg4dnXdfHlbaTeZm95pqfy1UpqX0vKUbEK12ql0kl8ttYiOOxF7NWUi6J0ZNwsbFk8BeG/oIehUc2o8sdoz/2up9yqE08TZm1cC8IpNiNOoMd83rtUCt8VMQUoGvO2jxFicBUHlplFc2TQymfpAtxk7HtA96PWI0IR33gxhGq00/KZuDsIvTrnYUBEtYlld9paKxDCCho5+6rYhhevVUMUxjjnZ13RWawrSeRwK4leHRMCqEStYdqX+ap8h0sAMNPWSFS9PDteaaBU25QI3Tl5Rq47ewJSYBhcx8De21rEsy3P/zUz8veJqLn0XlF50RXFXTUwENd2XvK X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123555025)(20161123558100)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:HK2PR0601MB1873; BCL:0; PCL:0; RULEID:; SRVR:HK2PR0601MB1873; X-Microsoft-Exchange-Diagnostics: 1; HK2PR0601MB1873; 4:FFLl5Hooa1YJlVXm6Sy0bT7OerQz8LpDjkp7xgbchOff3ys3MONq7IvxYynItX9GrkpP1zfWKsdrnQIUUUAgYtdJF7a5PIfTo4TgT3MnJNN+MGczeaNrBTSRY28+/uiQrljpe3QXutpRyzuc5t6COWkflvSXFeKc2hEkNbhFFcV7stZpWu40W1Xxi4dybGevaLbim9FZN2sykABEx04NYJyGC9NQmDfBQbcvXp+c6H9W+yBurL/fwo5z16PpuAHN7GKrZhwL/w9uL8pfZU1L2cNeEUZf1U1ME+89ifTEQHUE24Fq5+gIanVrMzxhafzYYDqMrCREhEeDkGRdKXfy0YK5Bv1qz/FZVgoEvi/i+f4XHyr7tsIaj6e1VNvXJPJgrq4BPxk8/MhfVCb/WzAhaV7I6S0dmstKsjsa47gIKrjmhylpA+5Jv0mSw40j5PN+fnXKujKhQRLN2tqSyW1wMd7rFIRQHBhAafs2uhC5MYhIrqPSobkGLNMLgd2VKOZtLw8OZG+O/i9HmQee2nlEof8Km0NSCmSr/x+rPbEbs5vR5Yd8gMoYAwslBJTzJeUVWr7a0eSVdsLUifj45rcYBvlS54oda3HMnMogQMNc2GjiJUnlpJRRTjBshfjRukI1Hb7nD3F7Gd/gy1I5McBueXz7OBnuwZ0DlTj5ZpwwbHIO59Tcab3mbtATH0TjffJMOg+rRTKGR9FcVjGcMMDPBnUuEPemccfMgPsgv5B9zexOeMlfiRpjH527/HRrB6Gp+/HhPWPnmgGckEFQFP+08GjqUPogMjcT8qvc/lp/zx2rMuP3eR4n5LOsDpB+MAro X-Forefront-PRVS: 0311124FA9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39840400002)(39450400003)(39850400002)(39400400002)(39410400002)(39860400002)(83506001)(25786009)(66066001)(50986999)(4326008)(33646002)(53936002)(47776003)(7416002)(76176999)(54356999)(54906002)(8676002)(50466002)(81166006)(478600001)(6486002)(3846002)(23726003)(36756003)(305945005)(86362001)(53416004)(38730400002)(189998001)(2950100002)(5660300001)(42186005)(7736002)(6116002)(4001350100001)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR0601MB1873; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR0601MB1873; 23:y6i2DutASPO1fYCW1fTBXvkU6p84o9ysFgRo/Ka?= =?us-ascii?Q?eAAMtIgzWQdrhSk8eY37NARs+sG84CeTfpWCuWU/JtvWHq4GkEaoqfChcsYB?= =?us-ascii?Q?ZGG8UVkEeUvuW9NAzGxr+mk+0tJiy1jexxLgopJgQd6xPP9J3ySSAPqS0Lxp?= =?us-ascii?Q?LrCdQSDsK1qbmnMKpOcdRcU4uvoERkbcWcekm059uMoxvs2O48MTljDOIdYE?= =?us-ascii?Q?DL4TocIqD04NnrpruciN5ckeShz/yfwgvLjWXZkrTC+GAaCpGtWAnjXsZM25?= =?us-ascii?Q?a+X4tAU1rmOqfVyiIXPczuErAcu83I/k9JOzJ5L1QODJ6OIemTpM8R4BM7Q6?= =?us-ascii?Q?A7hXUtf2qRm2aSUgzEOkfs6GrWVojjrmqe6cMC1C8FODHrSzHvRUxCxeKXCr?= =?us-ascii?Q?vVAhVa2i/x7lDaNUpWrddW4TpgRmJp6EAQr6SR+HjKmxu90lnsZZ7H24AHVp?= =?us-ascii?Q?itxD4DYkDXWdZ664XnjlsJhzx2aihDzzm4757b0HGkuX0iZLYxEEYPoEsKOn?= =?us-ascii?Q?jn+0nc9M10R0mdp7PNirU4Wir+x4daqYB2ZIebyjnxupyJdL/P+9JNivbvww?= =?us-ascii?Q?JG4IiaUbKqyvtR07SX8Kt4Djj23132g6zCF3Sp+IC3wRq8M5k5K80j97uSls?= =?us-ascii?Q?/46cdh7YTA75TTDz9TsET2Hc9q5Pu3DcJia29kEV066RG92VZdzGCHOp29Gk?= =?us-ascii?Q?4bhjZfW5YFgjTYMh1PxcCdK789x+WHSFXViVbop+UMPXWz7LKM/EMv1MiDh2?= =?us-ascii?Q?73RyHXngf420BsTAo4frBrkonRrdCF85RQ52J2lrxyKNdlAZn4LN2Or9vGm6?= =?us-ascii?Q?EPuMQTVx5gY8gXTrbiKsO+dJsfOoAM4Od4pYAMWwQpv1IMH/HFU2OyUY/Won?= =?us-ascii?Q?ROhvHq1fFtkFzOtm+1v+WqwcGmV5urHTc9mKhEApCb0g8oLY1OJejw2bNOjJ?= =?us-ascii?Q?Wgs0AOrOBXmAAJ4jlSV5F1Lo6+zMbjUl7XlZhpbGUVThm0Qu1AOWZUfnGjhQ?= =?us-ascii?Q?OApIuuRM+1Vh/hugriRRnxU1H6tUzQ2bscwZPReFvNe7nCrnb1CXfkIDSl4x?= =?us-ascii?Q?yjSvItzM=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR0601MB1873; 6:kTErSkzxIxXCtQO6SV/4kMs0Qc2aqnCsGRdbJhDJ7pg5oztp2UYOiNjQMboDsaiftchiG3Wk/qynGj5sEKW0+Vhid8Oy6uNgjgQfdkhceZHjYVWQZbAEP1cEheHQqonmjkfmHoID3tygw8N4pa+kJpJ6+1ue6Ed2bsaeUMAFDVipf2jc+afnylrx/eS9FNZuGt2tfpgxIOmEoybSnyPISLD1mL+a3C6S03PbSN5Apd7dqIx6cfJGG2Top4scSqaYx5ZoLRyOi1lRITPFdEFMYERlirG8Mg8xc7nCcmAE09jsPmDRpWLYjVT16EW7wgMlYny4F8Oj8hZAWDL9SGKexuwoSDNnOUAG5L5u39RshLvZLHRSfpmHCy1Wpv5FyaI4S664d38S2zMu7ir28qyvrxEIkipsZ6UvY2plqBhXuG5U7rLuQiPYCCsSzJsofIGqCJA9AtyZLil4Aj39ZjiQsp9OJMbKzOtG8TyBSl3j/A6NcwT8ZNj24EOxBdSByZAjdo2YE+lKxKXtOTLCwY3XJC+/JsW85au8uuc+SRk7qLA=; 5:OlnyBizmn57dIaxIPGrtTFBqEfC6eC8pXtQh3gRNKwIj+5UE69HqQcApr1FkksULy5M/lwRWQbzz3buAMt0kbVv6r+xDCOxvzJasDo19xL7CWl8cTDQKpQ5eNW4euiHQzLhIPIytX7kRnxKQmt3G/w==; 24:Q0DPX9bHz8GlA3EHeAZe4x8Gm8ekGq8Sv0LnjOfPa42Tk/U0fvQJDpp9Y+yfF1tNwoTI5i/24WwaQC0cfOBMqmrf6+9ovMbQzqXeAsnTt6s= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HK2PR0601MB1873; 7:M9T5tjAldMvN/RixGSAMRZe2GdpOmCXMlFrIyp7cBea5RFSc6/P7RMAN8FAGy01P7szuQX+Qr2ObvWzA8RojB3IwNrvsnodbwkbrwmqqEHIBoEki4zkKHExAQwlQVxCyTTmoFH96sEIKfwSMBgRJ/9SJh3b4rbvXc20Ohyt0HdyR015Alg2+ySRcwrV5YIGXaYjP3inDTOsGRHsAyAtBdswVGKZ6MTGoK0JTXOFDlgo+WpwasEjIfKLJkrw1KcphXQQsMbCW6HHXnWx2mrgnXQuQ7GgtXjIEPWNO5HEKko/zB75AoGfawImg8ko0Z5UjpA72v9DPUl+/JTRiXrsrWw==; 20:K+ay0UAwsX8+VexDIXAzZk5sN7wHSC9ht2O129EN9OFGBtq2B8pAezG4na7Yx8qE1/C8QzDFaMGe8yxusdRRStcCMNeA4K5VHqblcY2mmBB1v/GLykGv2/hBJjRCVttPLg51Jj/JvVOuAnruWjdBKTInBWbkeIzNfyBMuOJX00g= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2017 01:40:02.3686 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR0601MB1873 X-Mailman-Approved-At: Thu, 18 May 2017 16:58:16 +0000 Cc: Jose Abreu , Linux-ALSA , Laurent Pinchart , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Russell King , Simon X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto DesignWare HDMI driver (= dw-hdmi) is supporting HDMI sound, and its probe function was calling sound binding function multiple times as same HDMI device different port. Because of this behavior, commit 9731f82d601 ("ASoC: hdmi-codec: enable multi probe for ...") was added for multi detection case. But, this DesignWare HDMI detection/bind code was exchanged/adjusted by commit 69497eb9234 ("drm: bridge: dw-hdmi: Implement DRM bridge..."). Now, all DesignWare HDMI sound ports are detected as 1 bindng function. Because of this, hdmi-codec multi detection support is no longer needed. Thus, this patch removes commit 9731f82d601 ("ASoC: hdmi-codec: enable multi probe for ..."), and its related commit 340327a62c4 ("ASoC: hdmi-codec: Fix hdmi_of_xlate_dai_name...") commit 8480ac56795 ("ASoC: hdmi-codec: remove HDMI device unregister") commit 0c343a35bfe ("ASoC: hdmi-codec: fix spelling mistake: ...) Signed-off-by: Kuninori Morimoto --- sound/soc/codecs/hdmi-codec.c | 88 ++----------------------------------------- 1 file changed, 3 insertions(+), 85 deletions(-) diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index a3f1514..8659b76 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -25,17 +25,6 @@ #include /* This is only to get MAX_ELD_BYTES */ -struct hdmi_device { - struct device *dev; - struct list_head list; - int cnt; -}; -#define pos_to_hdmi_device(pos) container_of((pos), struct hdmi_device, list) -LIST_HEAD(hdmi_device_list); -static DEFINE_MUTEX(hdmi_mutex); - -#define DAI_NAME_SIZE 16 - #define HDMI_CODEC_CHMAP_IDX_UNKNOWN -1 struct hdmi_codec_channel_map_table { @@ -702,6 +691,7 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd, } static struct snd_soc_dai_driver hdmi_i2s_dai = { + .name = "i2s-hifi", .id = DAI_ID_I2S, .playback = { .stream_name = "Playback", @@ -716,6 +706,7 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd, }; static const struct snd_soc_dai_driver hdmi_spdif_dai = { + .name = "spdif-hifi", .id = DAI_ID_SPDIF, .playback = { .stream_name = "Playback", @@ -728,32 +719,6 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd, .pcm_new = hdmi_codec_pcm_new, }; -static char hdmi_dai_name[][DAI_NAME_SIZE] = { - "hdmi-hifi.0", - "hdmi-hifi.1", - "hdmi-hifi.2", - "hdmi-hifi.3", -}; - -static int hdmi_of_xlate_dai_name(struct snd_soc_component *component, - struct of_phandle_args *args, - const char **dai_name) -{ - int id; - - if (args->args_count) - id = args->args[0]; - else - id = 0; - - if (id < ARRAY_SIZE(hdmi_dai_name)) { - *dai_name = hdmi_dai_name[id]; - return 0; - } - - return -EAGAIN; -} - static struct snd_soc_codec_driver hdmi_codec = { .component_driver = { .controls = hdmi_controls, @@ -762,7 +727,6 @@ static int hdmi_of_xlate_dai_name(struct snd_soc_component *component, .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), .dapm_routes = hdmi_routes, .num_dapm_routes = ARRAY_SIZE(hdmi_routes), - .of_xlate_dai_name = hdmi_of_xlate_dai_name, }, }; @@ -771,8 +735,6 @@ static int hdmi_codec_probe(struct platform_device *pdev) struct hdmi_codec_pdata *hcd = pdev->dev.platform_data; struct device *dev = &pdev->dev; struct hdmi_codec_priv *hcp; - struct hdmi_device *hd; - struct list_head *pos; int dai_count, i = 0; int ret; @@ -794,35 +756,6 @@ static int hdmi_codec_probe(struct platform_device *pdev) if (!hcp) return -ENOMEM; - hd = NULL; - mutex_lock(&hdmi_mutex); - list_for_each(pos, &hdmi_device_list) { - struct hdmi_device *tmp = pos_to_hdmi_device(pos); - - if (tmp->dev == dev->parent) { - hd = tmp; - break; - } - } - - if (!hd) { - hd = devm_kzalloc(dev, sizeof(*hd), GFP_KERNEL); - if (!hd) { - mutex_unlock(&hdmi_mutex); - return -ENOMEM; - } - - hd->dev = dev->parent; - - list_add_tail(&hd->list, &hdmi_device_list); - } - mutex_unlock(&hdmi_mutex); - - if (hd->cnt >= ARRAY_SIZE(hdmi_dai_name)) { - dev_err(dev, "too many hdmi codec are detected\n"); - return -EINVAL; - } - hcp->hcd = *hcd; mutex_init(&hcp->current_stream_lock); @@ -835,14 +768,11 @@ static int hdmi_codec_probe(struct platform_device *pdev) hcp->daidrv[i] = hdmi_i2s_dai; hcp->daidrv[i].playback.channels_max = hcd->max_i2s_channels; - hcp->daidrv[i].name = hdmi_dai_name[hd->cnt++]; i++; } - if (hcd->spdif) { + if (hcd->spdif) hcp->daidrv[i] = hdmi_spdif_dai; - hcp->daidrv[i].name = hdmi_dai_name[hd->cnt++]; - } ret = snd_soc_register_codec(dev, &hdmi_codec, hcp->daidrv, dai_count); @@ -859,20 +789,8 @@ static int hdmi_codec_probe(struct platform_device *pdev) static int hdmi_codec_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct list_head *pos; struct hdmi_codec_priv *hcp; - mutex_lock(&hdmi_mutex); - list_for_each(pos, &hdmi_device_list) { - struct hdmi_device *tmp = pos_to_hdmi_device(pos); - - if (tmp->dev == dev->parent) { - list_del(pos); - break; - } - } - mutex_unlock(&hdmi_mutex); - hcp = dev_get_drvdata(dev); kfree(hcp->chmap_info); snd_soc_unregister_codec(dev);