From patchwork Fri Aug 18 12:06:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9908483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9628D60386 for ; Fri, 18 Aug 2017 12:08:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90A8028C85 for ; Fri, 18 Aug 2017 12:08:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8579D28C92; Fri, 18 Aug 2017 12:08:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C03B328C94 for ; Fri, 18 Aug 2017 12:08:01 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E0D272677BA; Fri, 18 Aug 2017 14:06:38 +0200 (CEST) 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 813872677BB; Fri, 18 Aug 2017 14:06:37 +0200 (CEST) Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by alsa0.perex.cz (Postfix) with ESMTP id 4F1F82677B9 for ; Fri, 18 Aug 2017 14:06:35 +0200 (CEST) Received: by mail-pg0-f68.google.com with SMTP id 83so14808675pgb.4 for ; Fri, 18 Aug 2017 05:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ST5STWBNG4JPisG+tFNe5qp5hAE7v2yPIU2cGQeCPIg=; b=LOivzuzDJF9UGs7DsqHksPr1tGCNoE7Cxnc+vBSZgtOjH4X2Sb7L/X/C8LmZXNHL2J R2xWYU62CMAduBusC9SO1BNgjukgYCFJ942izFO9UXgbQpIrtnYUW44xKzVDwosq8LUo 8fhIVwZMR/DERSp8RdZ2eBq0ywI0biva8FP6K/uqgX38O0XSqtNPSRBNSf+2vQxEY0Bu Z8wzS7FOAXKi+85cpMooDLKttw6FJTgrnexdKiMbYXZDTtBEXYnqehlr32Q7lw3TtGIX D77+GWhkzCionDZJa7suzR37eDGMuyresSMiXGm1n6+9LkBUBlfjNtkIp1ccg2SJ1sVo 0zsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ST5STWBNG4JPisG+tFNe5qp5hAE7v2yPIU2cGQeCPIg=; b=KVcqY9am//BdnqTrBHv4Uwolc30BYYVcI71fBvIofDcSTh+2LwA1OVEZFCsjrZ1oDw WFeoLNElbEQj/TrNfJvXCmEA/93aEXwPnHRhp9kCSaA/OCAWOovUP2Ot7l1jUWw8qLJJ 6NcT3HRDFRwVyELijkAcFH0GRqpqSmgALL2R/03/F/CBME+5vA+MLAb+y9n7DNwfmFd5 TdYN0uTzaOXfY/DxoOJFLwf09l7yK0FarHNXpOjFiVSNk9803xfxNuUmbXpcHWRlok7X ju0WX5GDVHQPt0g3vQkzsI9E8K7KLZJSyXU7PEclS55TvVu+1dG7Dq7yQG7Bq9cxviqd p8Pw== X-Gm-Message-State: AHYfb5hzkF+3NhXzcQzb4Gzg4UZm1HybFxGjsivrr5OLKNjCFhkYswcT TiXVGIjBC04ZhVtjXI8= X-Received: by 10.98.98.129 with SMTP id w123mr8501854pfb.221.1503057994354; Fri, 18 Aug 2017 05:06:34 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id s3sm12666929pgn.70.2017.08.18.05.06.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Aug 2017 05:06:33 -0700 (PDT) From: Arvind Yadav To: bardliao@realtek.com, oder_chiou@realtek.com, timur@tabi.org, lgirdwood@gmail.com, broonie@kernel.org Date: Fri, 18 Aug 2017 17:36:01 +0530 Message-Id: <1503057971-16033-5-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503057971-16033-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1503057971-16033-1-git-send-email-arvind.yadav.cs@gmail.com> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH 04/14] ASoC: fsl: constify snd_soc_dai_ops structures 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 snd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by work with const snd_soc_dai_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- sound/soc/fsl/fsl_asrc.c | 2 +- sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_spdif.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 8cfffa7..806d399 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -542,7 +542,7 @@ static int fsl_asrc_dai_trigger(struct snd_pcm_substream *substream, int cmd, return 0; } -static struct snd_soc_dai_ops fsl_asrc_dai_ops = { +static const struct snd_soc_dai_ops fsl_asrc_dai_ops = { .hw_params = fsl_asrc_dai_hw_params, .hw_free = fsl_asrc_dai_hw_free, .trigger = fsl_asrc_dai_trigger, diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index 809a069..cef79a1 100644 --- a/sound/soc/fsl/fsl_esai.c +++ b/sound/soc/fsl/fsl_esai.c @@ -620,7 +620,7 @@ static int fsl_esai_trigger(struct snd_pcm_substream *substream, int cmd, return 0; } -static struct snd_soc_dai_ops fsl_esai_dai_ops = { +static const struct snd_soc_dai_ops fsl_esai_dai_ops = { .startup = fsl_esai_startup, .shutdown = fsl_esai_shutdown, .trigger = fsl_esai_trigger, diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 1ff467c..7e6cc4d 100644 --- a/sound/soc/fsl/fsl_spdif.c +++ b/sound/soc/fsl/fsl_spdif.c @@ -626,7 +626,7 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream, return 0; } -static struct snd_soc_dai_ops fsl_spdif_dai_ops = { +static const struct snd_soc_dai_ops fsl_spdif_dai_ops = { .startup = fsl_spdif_startup, .hw_params = fsl_spdif_hw_params, .trigger = fsl_spdif_trigger,