From patchwork Mon Jan 5 09:18:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5565951 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 629F69F2ED for ; Mon, 5 Jan 2015 09:20:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 975A92015A for ; Mon, 5 Jan 2015 09:20:16 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 78064200DE for ; Mon, 5 Jan 2015 09:20:15 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 95827265068; Mon, 5 Jan 2015 10:20:14 +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 1163E26147E; Mon, 5 Jan 2015 10:19:03 +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 12CFD261469; Mon, 5 Jan 2015 10:18:59 +0100 (CET) Received: from mailout4.w1.samsung.com (mailout4.w1.samsung.com [210.118.77.14]) by alsa0.perex.cz (Postfix) with ESMTP id 77D6E2608D4 for ; Mon, 5 Jan 2015 10:18:48 +0100 (CET) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) 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 <0NHP00JKF61TVV60@mailout4.w1.samsung.com> for alsa-devel@alsa-project.org; Mon, 05 Jan 2015 09:22:41 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-ef-54aa56ef7280 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 9C.6E.07834.FE65AA45; Mon, 05 Jan 2015 09:18:39 +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:39 +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:28 +0100 Message-id: <1420449508-10701-8-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+NgFmpnluLIzCtJLcpLzFFi42I5/e/4Zd33YatCDBZ9ULe4cvEQk8XUh0/Y LF6/MLT4dqWDyeLyrjlsFsvf/mez6NzVz2rxcvMbJgcOjw2fm9g8ds66y+6xaVUnm8fLib/Z PPa9Xcbm0bdlFaPH5tPVHp83yQVwRHHZpKTmZJalFunbJXBlXJ77hb3gK3dF67XrLA2MXzm7 GDk5JARMJI5OvsQGYYtJXLi3Hsjm4hASWMooMX3yNSYIp49JorPzHBNIFZuAscTm5UvAOkQE jjNKfHjmAWIzC0RI3FzygAXEFhaIlrh9chsjiM0ioCrx5HgXUJyDg1fAXWL90VSIZXISJ49N ZgWxOQU8JN7MnAo2UgiopGtSN8sERt4FjAyrGEVTS5MLipPScw31ihNzi0vz0vWS83M3MUIC 78sOxsXHrA4xCnAwKvHwepxYGSLEmlhWXJl7iFGCg1lJhHfdLaAQb0piZVVqUX58UWlOavEh RiYOTqkGxniXvXymvz+qGExxOe/6yrDf9G96zpxl9+vimvazS7rZCJhVhLjfD53/9eoyjYz6 N0v2bI682Mmy/eqrJnWjveG3nnbvvRTu9sxGx/Fyyc1Lnt3z1FQMOuxmKc4q9N7ZcDHWT/GU xOwyxTdhhtE8K2/d/C5vzJgXmSi/onHZbN6dyQuuTNggqMRSnJFoqMVcVJwIAMAMyGUaAgAA Cc: Krzysztof Kozlowski , patches@opensource.wolfsonmicro.com Subject: [alsa-devel] [PATCH 8/8] ASoC: wm8804: 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 (snd_soc_register_codec() accepts pointer to const) and array of default register values const as well. Signed-off-by: Krzysztof Kozlowski Cc: patches@opensource.wolfsonmicro.com Acked-by: Charles Keepax --- sound/soc/codecs/wm8995.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c index c280f0a3a424..120228b6b596 100644 --- a/sound/soc/codecs/wm8995.c +++ b/sound/soc/codecs/wm8995.c @@ -44,7 +44,7 @@ static const char *wm8995_supply_names[WM8995_NUM_SUPPLIES] = { "MICVDD" }; -static struct reg_default wm8995_reg_defaults[] = { +static const struct reg_default wm8995_reg_defaults[] = { { 0, 0x8995 }, { 5, 0x0100 }, { 16, 0x000b }, @@ -2190,7 +2190,7 @@ static struct snd_soc_dai_driver wm8995_dai[] = { } }; -static struct snd_soc_codec_driver soc_codec_dev_wm8995 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8995 = { .probe = wm8995_probe, .remove = wm8995_remove, .set_bias_level = wm8995_set_bias_level, @@ -2204,7 +2204,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8995 = { .num_dapm_routes = ARRAY_SIZE(wm8995_intercon), }; -static struct regmap_config wm8995_regmap = { +static const struct regmap_config wm8995_regmap = { .reg_bits = 16, .val_bits = 16,