From patchwork Mon Aug 14 05:56:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9898113 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 9215F602D9 for ; Mon, 14 Aug 2017 05:58:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 840B728066 for ; Mon, 14 Aug 2017 05:58:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78C28285B3; Mon, 14 Aug 2017 05:58:16 +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 7801D285C6 for ; Mon, 14 Aug 2017 05:58:13 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 87053266DA4; Mon, 14 Aug 2017 07:57:45 +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 522C6266DE1; Mon, 14 Aug 2017 07:57:44 +0200 (CEST) Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by alsa0.perex.cz (Postfix) with ESMTP id 5188A266DA4 for ; Mon, 14 Aug 2017 07:57:42 +0200 (CEST) Received: by mail-pg0-f65.google.com with SMTP id y129so8950693pgy.3 for ; Sun, 13 Aug 2017 22:57:41 -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=b5xQPKSUR4ddeBLkDopltodEA4D67BcvSl/vK3c9J1I=; b=kWjGwWn795AmHG+aI0nlEgibGzB4NZMBM5yI1cEX4PIoj9MXywTOeEsaSs6vW3O5TO 3/zXzkIXBqmeacjLHuRdRd+QErXR6ESEMBctGOsB7O4bQrSjZcUoFhckrN5KfHMAqbYv CNxZH8XA4xgNgfUFHAbmAU6dfu54FeLDjQOI1l5xrrnW6lZqrSM25ei6flYhRm/OCk/s mvMOSuJ+de4AnQzt0xgHuDY3HM5voD1/FXmZYZ0jxWoemC3biKD0Tjz4C23NKRQL0Wif PDt+RCCUTqD2qb3musMexp3VQzwwrFaOBpqjA30u1oOG0xm2lIQmQDadR1t3osp6UnH2 9ZlQ== 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=b5xQPKSUR4ddeBLkDopltodEA4D67BcvSl/vK3c9J1I=; b=h2fpgwRdqXslH4lgLZFGgnMZ/T/fWka5GBKkxhdATTJzZTvWb/361xksfWNQg4xAq9 1rP8x2UQ83BcE6MWSrAq3adgCRfX6q49zm/GGWxHD33dQggDk1/4BXLV0WsKxMaHEPYR ZOnPlxbxhEGfUsaq7hD0iTfYHSXnOzeJ+LVli5tHpmCGjYdQafYWoPaa+1g8OK8Vs5d5 srfMp6EkVdnUPYQTn7mxREeoMZBFiy2MTWbCGgAuG0cUqR4UFlhOj09JpJ0MuLM21aeL nNqsQDUDx20fgvrQ+omENqxGq1re01OISJGMQKLmJ3VWRLBY3mcNqWlYKq3SU0vsCerr ty5Q== X-Gm-Message-State: AHYfb5hbDMwFHmvjZjXzW7NqkPAXJnnLHm1GNBZi/K5VBVCGF3eKJO/Q NJFoseECbYQo9z+ShVo= X-Received: by 10.84.179.165 with SMTP id b34mr26759970plc.455.1502690261274; Sun, 13 Aug 2017 22:57:41 -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.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 13 Aug 2017 22:57:40 -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:24 +0530 Message-Id: <1502690193-29059-2-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 01/10] ASoC: au1x: 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/au1x/dbdma2.c | 2 +- sound/soc/au1x/dma.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c index b5d1caa..6a035ca 100644 --- a/sound/soc/au1x/dbdma2.c +++ b/sound/soc/au1x/dbdma2.c @@ -304,7 +304,7 @@ static int au1xpsc_pcm_close(struct snd_pcm_substream *substream) return 0; } -static struct snd_pcm_ops au1xpsc_pcm_ops = { +static const struct snd_pcm_ops au1xpsc_pcm_ops = { .open = au1xpsc_pcm_open, .close = au1xpsc_pcm_close, .ioctl = snd_pcm_lib_ioctl, diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c index fcf5a9a..19457e2 100644 --- a/sound/soc/au1x/dma.c +++ b/sound/soc/au1x/dma.c @@ -277,7 +277,7 @@ static snd_pcm_uframes_t alchemy_pcm_pointer(struct snd_pcm_substream *ss) return bytes_to_frames(ss->runtime, location); } -static struct snd_pcm_ops alchemy_pcm_ops = { +static const struct snd_pcm_ops alchemy_pcm_ops = { .open = alchemy_pcm_open, .close = alchemy_pcm_close, .ioctl = snd_pcm_lib_ioctl,