From patchwork Mon Jan 5 09:18:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5565931 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 004B89F2ED for ; Mon, 5 Jan 2015 09:19:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 25D4420165 for ; Mon, 5 Jan 2015 09:19:51 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D2938200DE for ; Mon, 5 Jan 2015 09:19:49 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 97735265019; Mon, 5 Jan 2015 10:19:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,RCVD_IN_SBL, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id ED9E02608B4; Mon, 5 Jan 2015 10:19:01 +0100 (CET) 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 2AA8326147A; Mon, 5 Jan 2015 10:18:59 +0100 (CET) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by alsa0.perex.cz (Postfix) with ESMTP id 5C1A52608C9 for ; Mon, 5 Jan 2015 10:18:48 +0100 (CET) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NHP00K9Z61UI940@mailout2.w1.samsung.com> for alsa-devel@alsa-project.org; Mon, 05 Jan 2015 09:22:42 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-e6-54aa56eedf70 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id FE.EA.26295.EE65AA45; Mon, 05 Jan 2015 09:18:38 +0000 (GMT) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NHP009VW5UXPJ80@eusync1.samsung.com>; Mon, 05 Jan 2015 09:18:37 +0000 (GMT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Date: Mon, 05 Jan 2015 10:18:23 +0100 Message-id: <1420449508-10701-3-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1420449508-10701-1-git-send-email-k.kozlowski@samsung.com> References: <1420449508-10701-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjluLIzCtJLcpLzFFi42I5/e/4Zd13YatCDD5uN7W4cvEQk0Xf8fnM FlMfPmGzeP3C0OLblQ4mi8u75rBZ9C38zWTRuauf1eLl5jdMDpweGz43sXn0TrzF4rFz1l12 j02rOtk89r1dxubRt2UVo8fm09UenzfJBXBEcdmkpOZklqUW6dslcGVcOLCIqeAmZ0XLzh62 BsbJHF2MnBwSAiYSy3e2MUHYYhIX7q1n62Lk4hASWMooseTcSiinj0ni7MxPrCBVbALGEpuX L2EDsUUEjjNKfHjmAVLELNDJKHF6x1WwImGBGIk3U+eD2SwCqhI3l7wFs3kF3CXeLFoMtU5O 4uSxyWBxTgEPiTczp4INFQKq6ZrUzTKBkXcBI8MqRtHU0uSC4qT0XCO94sTc4tK8dL3k/NxN jJAw/LqDcekxq0OMAhyMSjy8HidWhgixJpYVV+YeYpTgYFYS4V13CyjEm5JYWZValB9fVJqT WnyIkYmDU6qB0TXA88eShBvMgb+EjqRNu8Ac92mjVEA8T96Vxv69GmeUGrY+01rulWnyrlOO f4eNWNIZo9qcJj7lfze8JbwsHeKUz/T8Z5jDeH3jv84LuvNd5OQc3ZL/M51zq5PofNm08eFm RSsVNrbJ9y+Hszbre000eHSoitF4V6f3/OUWhzmUby0TfNqlxFKckWioxVxUnAgAqgxhICEC AAA= Cc: Krzysztof Kozlowski , Brian Austin , Paul Handrigan Subject: [alsa-devel] [PATCH 3/8] ASoC: cs42l52: Constify struct regmap_config and snd_soc_codec_driver 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Make struct snd_soc_codec_driver const as well (snd_soc_register_codec() accepts pointer to const). Signed-off-by: Krzysztof Kozlowski Cc: Brian Austin Cc: Paul Handrigan --- sound/soc/codecs/cs42l52.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 35fbef743fbe..1589e7a881d8 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c @@ -1103,7 +1103,7 @@ static int cs42l52_remove(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_cs42l52 = { +static const struct snd_soc_codec_driver soc_codec_dev_cs42l52 = { .probe = cs42l52_probe, .remove = cs42l52_remove, .set_bias_level = cs42l52_set_bias_level, @@ -1130,7 +1130,7 @@ static const struct reg_default cs42l52_threshold_patch[] = { }; -static struct regmap_config cs42l52_regmap = { +static const struct regmap_config cs42l52_regmap = { .reg_bits = 8, .val_bits = 8,