From patchwork Mon Jan 5 09:18:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5565981 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 371B4BF6C3 for ; Mon, 5 Jan 2015 09:21:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 612D520166 for ; Mon, 5 Jan 2015 09:21:07 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4633820117 for ; Mon, 5 Jan 2015 09:21:06 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CA93F26510C; Mon, 5 Jan 2015 10:21:04 +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 4316A2619F0; Mon, 5 Jan 2015 10:19:05 +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 EBABB2608D4; Mon, 5 Jan 2015 10:19:00 +0100 (CET) Received: from mailout4.w1.samsung.com (mailout4.w1.samsung.com [210.118.77.14]) by alsa0.perex.cz (Postfix) with ESMTP id 3BBFE2608B4 for ; Mon, 5 Jan 2015 10:18:48 +0100 (CET) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NHP00GQR61R5M60@mailout4.w1.samsung.com> for alsa-devel@alsa-project.org; Mon, 05 Jan 2015 09:22:39 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-e3-54aa56ee6373 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 2E.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:22 +0100 Message-id: <1420449508-10701-2-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/4Zd13YatCDB60SFtcuXiIyaLv+Hxm i6kPn7BZvH5haPHtSgeTxeVdc9gs+hb+ZrLo3NXPavFy8xsmB06PDZ+b2Dx6J95i8dg56y67 x6ZVnWwe+94uY/Po27KK0WPz6WqPz5vkAjiiuGxSUnMyy1KL9O0SuDKOvHvOXtDPVbH08A+2 BsYjHF2MnBwSAiYSJyZeZoWwxSQu3FvP1sXIxSEksJRR4tLVVmYIp49J4uzMT2BVbALGEpuX L2EDsUUEjjNKfHjmAVLELNDJKHF6x1WwImGBGInemTtZQGwWAVWJ1lkfmUBsXgF3ic1LLzBD rJOTOHlsMlg9p4CHxJuZU8GGCgHVdE3qZpnAyLuAkWEVo2hqaXJBcVJ6rpFecWJucWleul5y fu4mRkgYft3BuPSY1SFGAQ5GJR5ejxMrQ4RYE8uKK3MPMUpwMCuJ8K67BRTiTUmsrEotyo8v Ks1JLT7EyMTBKdXAeHHRpIwXicwa21y+LJv4xe+wYpHTiolnHVkY58h9DeMtbXly+fGsXay2 GcUlsoueh3qkfGjlP5c6s/rAFtW2qwvyFt1l6xCZe7MtRU5W8vPxGI6Kl08TivjFGmqTeaKu ZeonPKhqOKOnvrFC+/PmxczMa1MXtzjxfnbO4Z8S+JRLm/W59eswJZbijERDLeai4kQASnZK fiECAAA= Cc: Krzysztof Kozlowski , Brian Austin , Paul Handrigan Subject: [alsa-devel] [PATCH 2/8] ASoC: cs35l32: 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 Acked-by: Brian Austin --- sound/soc/codecs/cs35l32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs35l32.c b/sound/soc/codecs/cs35l32.c index ec55c590afd0..f2b8aad21274 100644 --- a/sound/soc/codecs/cs35l32.c +++ b/sound/soc/codecs/cs35l32.c @@ -264,7 +264,7 @@ static int cs35l32_codec_set_sysclk(struct snd_soc_codec *codec, CS35L32_MCLK_DIV2_MASK | CS35L32_MCLK_RATIO_MASK, val); } -static struct snd_soc_codec_driver soc_codec_dev_cs35l32 = { +static const struct snd_soc_codec_driver soc_codec_dev_cs35l32 = { .set_sysclk = cs35l32_codec_set_sysclk, .dapm_widgets = cs35l32_dapm_widgets, @@ -288,7 +288,7 @@ static const struct reg_default cs35l32_monitor_patch[] = { { 0x00, 0x00 }, }; -static struct regmap_config cs35l32_regmap = { +static const struct regmap_config cs35l32_regmap = { .reg_bits = 8, .val_bits = 8,