From patchwork Wed May 31 12:32:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9756769 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 82C49602F0 for ; Wed, 31 May 2017 12:32:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C16C2807B for ; Wed, 31 May 2017 12:32:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6028D28420; Wed, 31 May 2017 12:32:36 +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=-1.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6743E2807B for ; Wed, 31 May 2017 12:32:35 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 01685266F00; Wed, 31 May 2017 14:32:33 +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 F10BC266F05; Wed, 31 May 2017 14:32:31 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0090.outbound.protection.outlook.com [104.47.1.90]) by alsa0.perex.cz (Postfix) with ESMTP id 59A2D266E2E for ; Wed, 31 May 2017 14:32:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentiatech.onmicrosoft.com; s=selector1-axentia-se; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XIT2Mm95QNlKNzbQ+YZvH7tlrcu3M072Y/hXfkDDi4A=; b=XWoo9WUnvnxDyhki/iEExnOebSg75YHVoGPVSiiL7/B/hXdydyd5jTUO8i01hzIdWYThVKQcgjERQIQotmd8caBOJC/1fyD3QuhoqYXSgILfTQVttxGM/DyRbbZ3eZKgA+fCGZXGSx4Dvi1L7oNeJeuI0TJgSHKJTU+rH3JFYU0= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=axentia.se; Received: from localhost.localdomain (81.224.171.159) by HE1PR0202MB2555.eurprd02.prod.outlook.com (2603:10a6:3:90::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 31 May 2017 12:32:21 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Date: Wed, 31 May 2017 14:32:33 +0200 Message-Id: <1496233953-758-1-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-Originating-IP: [81.224.171.159] X-ClientProxiedBy: DB6PR07CA0076.eurprd07.prod.outlook.com (2603:10a6:6:2b::14) To HE1PR0202MB2555.eurprd02.prod.outlook.com (2603:10a6:3:90::8) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0202MB2555: X-MS-Office365-Filtering-Correlation-Id: 2cfa3518-c0e6-4f19-9a33-08d4a8211632 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075); SRVR:HE1PR0202MB2555; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0202MB2555; 3:cF2N/5vUggcLFDQkbYi1rhUp9sB5CGyF0X6DTt700AhQDuLJC3nWYIGoMsJYwRGmTWTWkrmFumqXRl24FgCEbIIF4gJh3idtv8AJjryIIHh/IykZnZ2aaxKFDHdSGq8ZkIG6B6ihlkAyvUSPwX1Ktduu+JYfNtbJAGl+iYn+UAMeIZG+PIdhrauSCtLEzqSm7VIbauAs+cwKj+lOl3vc+UwrZwybnAscGw2IB7NyLWQxLQdCYs0nbxW54I0TEmbQT4ougIFxtdGydm+Kpcjf3ffW8Vs4cNn8n9YPgTK5WXY=; 25:g6GmIPqKwNHhwhDR4syBMoI01CM3IFGuEAy7NJaItnJksDBigBMSwYTVb+IL3cWnE97Ev39nigExU5nngsieH/sCug1WvacmNUI9GwVEE9epA+buitHYupb/76hv9OKGPZNMzTeHPYlWBpHLY5lquL1dkHqmeZ0LPkasVfgkHUOEDbkopm0Y7LRksEFRCe4IgDxtFLlcF8AUJ3eoMxNr58a2Yckf6SJBI8jjQMnszHeYHehFGDhfWNYJQWG8WnYvSexoY8bYsCX5jSOZpURFOAIPyzRvyJD1HYES8zqHBqhBXmE6WUCN7aRy4umHtH6sbgVuWiiKIDlSzowgatkVsRzLeQbBi3u1QUyCPa1guNivNck2Jnkl6LZMW+uYR3FujfUyurcBD9NoRXJl0U5gwLqXPmcTbdTTN7J523n83I6qniQVXMq8D8R/6SmHi2G5KzlqvHXNQ9RuSNKKyf+6f2emFOzkdgrfhREdNUhgagA= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0202MB2555; 31:UISYiJS4RJR0cXRVxisJFg5CG8B8ef3TK1sqAq2D6CINMiBt7ghtyOQPTKv1Esnryty6ckolNVPbfMRTxNLLYIpJqFeZsstENEk93rTfWZFDdl3kO0Ylvu/PIaC7aK5v53cADI9uKv6+N/6TznZnxK4ruelBcQaxWb6lCiYGPdqljU8cxo3rFYRxog7y3K17I6z0P9xxDjLq0nIPX4DbY5MTsqMUTmw/lw+WljvH4J4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703073)(100105400095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(2016111802025)(20161123564025)(20161123555025)(6072148)(6043046)(100000704073)(100105200095)(100000705073)(100105500095); SRVR:HE1PR0202MB2555; BCL:0; PCL:0; RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095); SRVR:HE1PR0202MB2555; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2555; 4:ZT81jqa2s4yCh1scUfh7dKpoqyiaRcnGQ+g/y6Zk?= =?us-ascii?Q?oCmtErYeu6Nq4kVHF7qIFgEfE5piAlSRshgnrpnuKZCseKyR5GzdzjYtZJwS?= =?us-ascii?Q?Hk5T5ROf2GCKofTY98sHJT6Z/92tA5TvyfzH00wBit6mUdiQ36FeCVgJF0ys?= =?us-ascii?Q?goxj9+bNc86Ws+aJKQD+ZSMqlA8ibAVKgn3imL/AzLAQytR5iNlEMDmmyhZA?= =?us-ascii?Q?xeStkFhuNosMdOQ3e4+7hIg49pfakYMr9WIKFJ64NH0Dus5ScEJLINs/d6CK?= =?us-ascii?Q?GQyoMGu6jHEKTZ6osVhYXpP8P30C0rcyjxEUR1cEN0GkPo3pEUKTBmIAhwTt?= =?us-ascii?Q?Z+uwSQEBzs2S3u/YbZk/2Qcs1PugQvuM4j/cw3tb8kRa2OTrhYqvjj1/X8eR?= =?us-ascii?Q?Tg0kwUDU/lbe8xupFWQirHAVD8V0/pS0LQ5sLhWLvGPqPYZOPgwRE2wN+wxN?= =?us-ascii?Q?vkBqFTAOWLMwm5t3YFrSxhDxw+whHxGC5LMj5fLG3dpZjhNC+vKIBerjF3//?= =?us-ascii?Q?w0uERGKe1tqOIy0mbjuSy72VvnBYWAnyKom0gbPnmG+0xCjSUM2aq3+GqFQh?= =?us-ascii?Q?/EtmiiwP1byBXIG+8b0q8M1cRgX494T6Wwr+a6iA7RgkSn37aA3hVjE1410M?= =?us-ascii?Q?VfkSPIUTL9nS8pumJ6FL2RQ0Nc268fHTPRvrF/l4lxuLHfyMqm8aPDpxbW39?= =?us-ascii?Q?2t5Rw3z7vpa47sKNxdQmhq6fHvLENfBcWuAVl9Qg6omZ34HVks3KFTVOh+Nk?= =?us-ascii?Q?LrUaNQ02gtOstiTs/X6Pewe66LF1v4Byoe3mR4CIWXCsJgLf+rgQ9ZuOP9sg?= =?us-ascii?Q?T/zzLVLr5ZMqjIrVssv0UENd1t3BPB/bOFaUv590usVJY2tbEZFWGPxSUNhE?= =?us-ascii?Q?mYSNezvm2gCPKau3hytSww2yrkSH8h0X7g7oAUp92PzrIxu+PPWKX7wCVkeS?= =?us-ascii?Q?7kufuo0xfCD1/eZ5e+8IxyYDfs5vRcAxqHVInUzOvfk1LL41jSGA4fxk3SzE?= =?us-ascii?Q?WZ6MHBTbWiYj7Ara6NKlWOiqI9EsULaCImuYQC7R2GxOiuPUi0XqC7bIvQ0h?= =?us-ascii?Q?Vdd5APlRUv8X64nayRmv8Ejl23rvog8nN3kqirZE+uY5kHsodP5mcWt6dAp+?= =?us-ascii?Q?tq7JV8ECHNPLidRM9Vg+L07Kj5RXm9MIAL8kWj99vzLa3YmOc94csgtCPKQH?= =?us-ascii?Q?U2dy9OnNepp2H9GL+6uyu3TB361xM/6SBEcN?= X-Forefront-PRVS: 0324C2C0E2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(39450400003)(39400400002)(39410400002)(39830400002)(48376002)(6486002)(50466002)(3846002)(6506006)(47776003)(305945005)(86362001)(50226002)(6916009)(36756003)(2906002)(189998001)(74482002)(6116002)(7736002)(66066001)(6666003)(230783001)(33646002)(478600001)(54906002)(4326008)(50986999)(6512007)(2361001)(53936002)(5660300001)(25786009)(8676002)(38730400002)(42186005)(110136004)(2351001)(5003940100001)(81166006)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0202MB2555; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2555; 23:7YqcUrjovQvp9gb2rE5vu14aRci3nOboe4zy77K?= =?us-ascii?Q?ntVypgWgb8YlRLUT6bjTelzkzonY/bf1DvmAzQyfMBE8Kre8Enfp7J8U4FWu?= =?us-ascii?Q?prB0QWYNOw5kFLbDEZLWSnOOgx/rYDAhUivtekSUx2LxPXoTPzOLc+QGg4f1?= =?us-ascii?Q?6FKCBMhHd5JG33m4hC7fdZgFvnq9IyGYPReZuzkoS+R/64wPr6uwW2s0kGrj?= =?us-ascii?Q?l2zUG2jYHg/QWpWc/NO9G8A8ozqU7cBhOUTYhYFcOAQ9aVgL8xatFbPm3uwK?= =?us-ascii?Q?Lo+o/rtyFEka8mNO27LqrMeBV2CACOI+6DMigryVfJV2DKn0anP4dyr2b3j7?= =?us-ascii?Q?XLuYtiFqa0k+caS1RM9rhq5HQsCgIMnGmGMyGcEh/omLAWnZpZNtUJH19ZAu?= =?us-ascii?Q?LAO6w5jnqZGaGf4HpCyIDPUm493Wly5PUGlC/wbZPbJBuLgjUtqwK6GMIEYY?= =?us-ascii?Q?CRtXuTKkwSb/BtAqYoc4SdaXaKwTqxmiJfRWEYTm3bjIlpnzaSEaLbLA0SXC?= =?us-ascii?Q?kV8TYM9ufzcRnuMs1Ctugc80f02hTO4YeIGgxrnVUZ2OJFARpHH9C6MhFQzs?= =?us-ascii?Q?PSQoIOiidM+tsnlhhCElw7ESwElYK9xq+xEFL0S1kgCL5xXgo0FnwhOdzjVf?= =?us-ascii?Q?5tR/NP7fZa10l2lsboC4HBV/Th8av+eSVBaqB90XrEYxl9XztiLin2E76UK6?= =?us-ascii?Q?9Fwfa2Vj9XpdWBbTs1NxxfEN8vDXIpdzVGJbNRs/CGtsBJohxzE5HFn9EHA5?= =?us-ascii?Q?OYJI3eZtXhGmg3dTaZE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JJCYPYfkvihOspxLjYkWLkKnL/6lWYGVXIvrr7m2V5YqfaW5qDODdVgMSPY72m/arzpFLz32sQDsE3wEZNF1qpG/NFvNMoxCrzcG/5Lt+OU29+buQMcdVd/3Wdf6ArQYf8+ZCNVmR9BZnrBJ10Hy+nKttev9CpUQp0uRdE0TQ/HcYj+zXijCoGs9kDYKcPPWmkBEg+YHW6Uf9v5qn750cEXpcnB++4xf9lHGlUA06KQrL5DBB66WMLprtg0ohKEpDeMC71mPr8AVXnMfjuc+o6uf29VryWYKONI5kEGHIWD0Hq/kOn7mP59GQgYXEYzmIAASK2a29E3j+LJ0fLQpusrviA02E881o5TLpqDBdONE/T+Yx36KB6FCd4wT/tXwdO/RSQ1zKtIpo0wJWDGMS0pF9nK+eswaMgefM6ExJbSKzrKf6rTiuOgwUtltxzprA7tNKFke1J; 24:wwwKOtGvv+hZ2H5wIDiMjGwEYfBHKlbqCHhjKUl4fr2eE8nnn7oc3XOxwqQGgXbgow79SDYjWe2PkbcZ56/9cdSv4dHEv+RDGQxoilVguBY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0202MB2555; 7:9A+VwTw6r1i8SmPYGd3GnjazooZp3VlPminFgbKz0XN0fiM80ytRZqU3dKpYtvfTquCqlXEaXVPEEtF8mA92lUIBK0bnx3/YfuHSNMB7ZOZtkbgEGsPZ4puh0eycNGNDh2hN6ogmviEMiBZrwPaw/qnoroyXIyyH/XrGQ94tslPsAXG9OxU00zptAOW5roUwDI0fqmGjlrPvsiNmlBbsewQ5Sv03YqoJt5I8Eq2TL9r9y2v3JJVqiaJjfIJSupnBluTEPF/mlqov5KiRrS4Q0ezMa7bRKytB3T4TT+t7w3BtUYDPcD9q/HRrdnirjbhI4ExQJzXfUyEhmOocxiwCkw== X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 12:32:21.2603 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0202MB2555 Cc: alsa-devel@alsa-project.org, Takashi Iwai , Liam Girdwood , Mark Brown , Peter Rosin , Nicolas Ferre Subject: [alsa-devel] [PATCH] ASoC: atmel: tse850: fix off-by-one in the "ANA" enumeration count 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 At some point I added the "Low" entry at the beginning of the array without bumping the enumeration count from 9 to 10. Fix this. While at it, fix the anti-pattern for the other enumeration (used by MUX{1,2}). Fixes: aa43112445f0 ("ASoC: atmel: tse850: add ASoC driver for the Axentia TSE-850") Signed-off-by: Peter Rosin --- sound/soc/atmel/tse850-pcm5142.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/atmel/tse850-pcm5142.c b/sound/soc/atmel/tse850-pcm5142.c index a72c7d642026..3a1393283156 100644 --- a/sound/soc/atmel/tse850-pcm5142.c +++ b/sound/soc/atmel/tse850-pcm5142.c @@ -227,7 +227,7 @@ int tse850_put_ana(struct snd_kcontrol *kctrl, static const char * const mux_text[] = { "Mixer", "Loop" }; static const struct soc_enum mux_enum = - SOC_ENUM_SINGLE(SND_SOC_NOPM, 0, 2, mux_text); + SOC_ENUM_SINGLE(SND_SOC_NOPM, 0, ARRAY_SIZE(mux_text), mux_text); static const struct snd_kcontrol_new mux1 = SOC_DAPM_ENUM_EXT("MUX1", mux_enum, tse850_get_mux1, tse850_put_mux1); @@ -252,7 +252,7 @@ static const char * const ana_text[] = { }; static const struct soc_enum ana_enum = - SOC_ENUM_SINGLE(SND_SOC_NOPM, 0, 9, ana_text); + SOC_ENUM_SINGLE(SND_SOC_NOPM, 0, ARRAY_SIZE(ana_text), ana_text); static const struct snd_kcontrol_new out = SOC_DAPM_ENUM_EXT("ANA", ana_enum, tse850_get_ana, tse850_put_ana);