From patchwork Fri Mar 20 11:35:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 6055751 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 AC9119F399 for ; Fri, 20 Mar 2015 11:36:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7724204E3 for ; Fri, 20 Mar 2015 11:36:16 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3F7E3204D1 for ; Fri, 20 Mar 2015 11:36:15 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 400B626074D; Fri, 20 Mar 2015 12:36: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.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 4C9E6260707; Fri, 20 Mar 2015 12:36:06 +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 04427260709; Fri, 20 Mar 2015 12:36:02 +0100 (CET) Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by alsa0.perex.cz (Postfix) with ESMTP id A92D5260703 for ; Fri, 20 Mar 2015 12:35:55 +0100 (CET) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NLI00FZXDQKOX60@mailout3.w1.samsung.com> for alsa-devel@alsa-project.org; Fri, 20 Mar 2015 11:39:57 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-fe-550c05704c16 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 14.02.07834.0750C055; Fri, 20 Mar 2015 11:33:05 +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 <0NLI008OWDJPCQ70@eusync1.samsung.com>; Fri, 20 Mar 2015 11:35:52 +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: Fri, 20 Mar 2015 12:35:45 +0100 Message-id: <1426851345-24930-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsVy+t/xy7qFrDyhBgtXM1pcuXiIyWLqwyds Fq9fGFp8u9LBZHF51xw2i85d/awWLze/YXJg99jwuYnNY+esu+wem1Z1snnse7uMzaNvyypG j82nqz0+b5ILYI/isklJzcksSy3St0vgyni9J7vgFX/F6fvbGBsYO3m7GDk5JARMJI5dWckK YYtJXLi3nq2LkYtDSGApo8TiL7uZIZw+JonzU44yg1SxCRhLbF6+hA3EFhE4zijx4ZkHiM0s YCjx890f9i5GDg5hAR+JB6fUQcIsAqoSl29OZwKxeQXcJaZ+aGCHWCYncfLYZNYJjNwLGBlW MYqmliYXFCel5xrqFSfmFpfmpesl5+duYoSEzJcdjIuPWR1iFOBgVOLh/bmbO1SINbGsuDL3 EKMEB7OSCO9GJp5QId6UxMqq1KL8+KLSnNTiQ4xMHJxSDYyTg5Uzd11nq2PZNO3YobLrnddl VwXFbXY9kxCz/0EQ75W7t2Zu+v7MSGF9xpWk7qW7dUpPOx6yWuUd4Ve9UEDGV8jdVaNdOuuW ax3DgwvJbYnz9/38U2HzsD33wCRftr19q6ReiybEnnTNtJ+Y/ipRoe+e/mPFO87BCz5mnz6Z bl1RPvVv9D0lluKMREMt5qLiRADjpKEr9wEAAA== Cc: Krzysztof Kozlowski Subject: [alsa-devel] [PATCH] ASoC: max98925: Constify regmap config and other codec data 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 Constify local structures (snd_soc_dai_ops, snd_soc_codec_driver, regmap_config) and array (reg_defaults) which are not modified by the driver and passed to core as pointer to const. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/max98925.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max98925.c b/sound/soc/codecs/max98925.c index 1f8e80315749..0796dfaeb139 100644 --- a/sound/soc/codecs/max98925.c +++ b/sound/soc/codecs/max98925.c @@ -34,7 +34,7 @@ static const char *const hpf_text[] = { "Disable", "DC Block", "100Hz", "200Hz", "400Hz", "800Hz", }; -static struct reg_default max98925_reg[] = { +static const struct reg_default max98925_reg[] = { { 0x0B, 0x00 }, /* IRQ Enable0 */ { 0x0C, 0x00 }, /* IRQ Enable1 */ { 0x0D, 0x00 }, /* IRQ Enable2 */ @@ -491,7 +491,7 @@ static int max98925_dai_set_sysclk(struct snd_soc_dai *dai, #define MAX98925_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) -static struct snd_soc_dai_ops max98925_dai_ops = { +static const struct snd_soc_dai_ops max98925_dai_ops = { .set_sysclk = max98925_dai_set_sysclk, .set_fmt = max98925_dai_set_fmt, .hw_params = max98925_dai_hw_params, @@ -541,7 +541,7 @@ static int max98925_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_dev_max98925 = { +static const struct snd_soc_codec_driver soc_codec_dev_max98925 = { .probe = max98925_probe, .controls = max98925_snd_controls, .num_controls = ARRAY_SIZE(max98925_snd_controls), @@ -551,7 +551,7 @@ static struct snd_soc_codec_driver soc_codec_dev_max98925 = { .num_dapm_widgets = ARRAY_SIZE(max98925_dapm_widgets), }; -static struct regmap_config max98925_regmap = { +static const struct regmap_config max98925_regmap = { .reg_bits = 8, .val_bits = 8, .max_register = MAX98925_REV_VERSION,