From patchwork Mon Aug 14 05:56:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9898137 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 7E01C602D9 for ; Mon, 14 Aug 2017 06:00:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FF102022B for ; Mon, 14 Aug 2017 06:00:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 634AE285AF; Mon, 14 Aug 2017 06:00:20 +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 CCB3E2022B for ; Mon, 14 Aug 2017 06:00:19 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 05999267339; Mon, 14 Aug 2017 07:58:13 +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 87BC5267329; Mon, 14 Aug 2017 07:58:11 +0200 (CEST) Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by alsa0.perex.cz (Postfix) with ESMTP id 80E7326731F for ; Mon, 14 Aug 2017 07:58:03 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id y192so8952478pgd.1 for ; Sun, 13 Aug 2017 22:58:03 -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=MMPDNrxNJke1BnymmZdC6VomyEB6K1SfIolNnR5lfd4=; b=Do0CTAr5nt10MO/IlqDLbMoqjcr/3WN8l20TZPT4KjHIvv01eytgbtbeG67j9kd+Tn NAAeDaQA2vOH3CIRzdVvNFCNt++KqLRZqz1xEq2J3ibvnZ3Vo/53oodgv0JSjEK3QDVc IvxhozezYnJg9RKqqVz8SkJ6Ntg427obga7ntGZI6p/TNFQXAbPAFy8dyr6VIZDyeZrS DXy/IeyfAplcHEvzf8s+V4QI1i9x3jYidzJizosZjEEfWC5WIKblqP9d/+LSrLb3tFWI bnOAvD+CiLG5Dyg5RxVpqQmwxVU0vyZmfh8qr0duiXwidCD2gn03Ffiwd5ZIyyklvOqd b8hg== 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=MMPDNrxNJke1BnymmZdC6VomyEB6K1SfIolNnR5lfd4=; b=SwdOEZu6oWqFJw/LMfCvyg3VcIFrUA19F9v+6ceFZmf2TS1LcbIOpfftu002cdyWrw pzBvb7aBnFH+OYmyzui2xMWofzrblsQzi6erM3rFpIyc67ge2Ji2y8NsHKsCOuDpjQYv a2cZD8VwQRBvXZA7+pee+X09JbREWK1Sj9CibmtN7pwzSqQXMd3o8iEnV/7HJwRYsk33 fQ0JwG401l1X4MV9mGxdMYjGqdAJ+dTq7u8JH+4wW5B1hljBXmgAe6VUBjS5OUeAw16Z pAwIGSSC9s4xJT+LrnG+HbmBwQHD5CGYa0ZV3NKkUsLuhhdSK2xAmBH2Y38xg4rYoAxc RLwA== X-Gm-Message-State: AHYfb5iKCBtaiSQuEwwc0jindvTpr/ZHWKVzXM6vOjcoEKJf9bCaf9jT mDIAwgvW8Qw2/Q== X-Received: by 10.99.43.67 with SMTP id r64mr22486051pgr.320.1502690282379; Sun, 13 Aug 2017 22:58:02 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id p80sm12990593pfa.19.2017.08.13.22.57.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 13 Aug 2017 22:58:01 -0700 (PDT) From: Arvind Yadav To: perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org Date: Mon, 14 Aug 2017 11:26:32 +0530 Message-Id: <1502690193-29059-10-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502690193-29059-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1502690193-29059-1-git-send-email-arvind.yadav.cs@gmail.com> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH 09/10] ASoC: sh: constify snd_pcm_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_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by work with const snd_pcm_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- sound/soc/sh/dma-sh7760.c | 2 +- sound/soc/sh/fsi.c | 2 +- sound/soc/sh/rcar/core.c | 2 +- sound/soc/sh/siu_pcm.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index 8fad444..df92f38 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c @@ -294,7 +294,7 @@ static snd_pcm_uframes_t camelot_pos(struct snd_pcm_substream *substream) return bytes_to_frames(runtime, pos); } -static struct snd_pcm_ops camelot_pcm_ops = { +static const struct snd_pcm_ops camelot_pcm_ops = { .open = camelot_pcm_open, .close = camelot_pcm_close, .ioctl = snd_pcm_lib_ioctl, diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 7c4bdd8..094e285 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1755,7 +1755,7 @@ static snd_pcm_uframes_t fsi_pointer(struct snd_pcm_substream *substream) return fsi_sample2frame(fsi, io->buff_sample_pos); } -static struct snd_pcm_ops fsi_pcm_ops = { +static const struct snd_pcm_ops fsi_pcm_ops = { .open = fsi_pcm_open, .ioctl = snd_pcm_lib_ioctl, .hw_params = fsi_hw_params, diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 3f2ced2..6f24dd1 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1158,7 +1158,7 @@ static snd_pcm_uframes_t rsnd_pointer(struct snd_pcm_substream *substream) return pointer; } -static struct snd_pcm_ops rsnd_pcm_ops = { +static const struct snd_pcm_ops rsnd_pcm_ops = { .open = rsnd_pcm_open, .ioctl = snd_pcm_lib_ioctl, .hw_params = rsnd_hw_params, diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index 82902f5..3118cb0 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c @@ -593,7 +593,7 @@ static void siu_pcm_free(struct snd_pcm *pcm) dev_dbg(pcm->card->dev, "%s\n", __func__); } -static struct snd_pcm_ops siu_pcm_ops = { +static const struct snd_pcm_ops siu_pcm_ops = { .open = siu_pcm_open, .close = siu_pcm_close, .ioctl = snd_pcm_lib_ioctl,