From patchwork Mon Jan 5 09:18:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5565961 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 A8CA2BF6C3 for ; Mon, 5 Jan 2015 09:20:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5D6020165 for ; Mon, 5 Jan 2015 09:20:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8C33E200DE for ; Mon, 5 Jan 2015 09:20:44 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 853EE2650C5; Mon, 5 Jan 2015 10:20:43 +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 7E6032614C5; 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 E90FC26147A; 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 5C4FD2608CF 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 <0NHP00GQT61T5M60@mailout4.w1.samsung.com> for alsa-devel@alsa-project.org; Mon, 05 Jan 2015 09:22:41 +0000 (GMT) X-AuditID: cbfec7f5-b7fc86d0000066b7-ef-54aa56f03d2c Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 12.FA.26295.0F65AA45; Mon, 05 Jan 2015 09:18:40 +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:27 +0100 Message-id: <1420449508-10701-7-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+NgFmpmluLIzCtJLcpLzFFi42I5/e/4Zd0PYatCDG6+ULG4cvEQk8XUh0/Y LF6/MLT4dqWDyeLyrjlsFsvf/mez6NzVz2rxcvMbJgcOjw2fm9g8ds66y+6xaVUnm8fLib/Z PPa9Xcbm0bdlFaPH5tPVHp83yQVwRHHZpKTmZJalFunbJXBlTJz7m6ngGGfFqVe5DYytHF2M nBwSAiYSrdtnM0HYYhIX7q1n62Lk4BASWMoo8QgozAVk9jFJdHaeA6thEzCW2Lx8CRuILSJw nFHiwzMPEJtZIELi5pIHLCC2sEC0xI9pPSwgc1gEVCV2/wkEMXkF3CUOrmGD2CQncfLYZFYQ m1PAQ+LNzKlgcSGgkq5J3SwTGHkXMDKsYhRNLU0uKE5KzzXSK07MLS7NS9dLzs/dxAgJuK87 GJceszrEKMDBqMTD63FiZYgQa2JZcWXuIUYJDmYlEd51t4BCvCmJlVWpRfnxRaU5qcWHGJk4 OKUaGHevS1Iss3oe/e3ISaNDpk+db/VJHVLYejj9A+eCK7umGq3xMA/y5ylnCm0u+7Ga01il YWrGn0h77zDRn//OzVrfvGZe8quVtTysbhu9Zl/NerVUf7+d2rIiB+PObjat/6WmFyfO2jpp rsvls399HYp7/FI9Uu9yT62vuWz25ZaS895u3Qluu5VYijMSDbWYi4oTAYom7qcWAgAA Cc: Krzysztof Kozlowski , patches@opensource.wolfsonmicro.com Subject: [alsa-devel] [PATCH 7/8] ASoC: wm8988: 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: patches@opensource.wolfsonmicro.com Acked-by: Charles Keepax --- sound/soc/codecs/wm8988.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c index e418199155a8..d320c5251856 100644 --- a/sound/soc/codecs/wm8988.c +++ b/sound/soc/codecs/wm8988.c @@ -813,7 +813,7 @@ static int wm8988_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_wm8988 = { +static const struct snd_soc_codec_driver soc_codec_dev_wm8988 = { .probe = wm8988_probe, .set_bias_level = wm8988_set_bias_level, .suspend_bias_off = true, @@ -826,7 +826,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8988 = { .num_dapm_routes = ARRAY_SIZE(wm8988_dapm_routes), }; -static struct regmap_config wm8988_regmap = { +static const struct regmap_config wm8988_regmap = { .reg_bits = 7, .val_bits = 9,