From patchwork Thu Aug 17 09:15:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9905355 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 9C48B60244 for ; Thu, 17 Aug 2017 09:17:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9684128AB7 for ; Thu, 17 Aug 2017 09:17:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B53628AD5; Thu, 17 Aug 2017 09:17:21 +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=0.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB,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 B402628AB7 for ; Thu, 17 Aug 2017 09:17:20 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 37BF5266EB6; Thu, 17 Aug 2017 11:17:02 +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 AFA7D267631; Thu, 17 Aug 2017 11:17:01 +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 024B826762B for ; Thu, 17 Aug 2017 11:16:55 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id t80so2788195pgb.2 for ; Thu, 17 Aug 2017 02:16:55 -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=OiNMlnQB8VGQjohFJnPAFnU5AP88BYqvWh/8rHE0euA=; b=Iz1W3z6/FwxEOUSn0LzyaFsak8PWtsgQEbr1RgMz5/OyMcetOTnq/2ez9j0FdGC4fq tgMBGtOnoqnhKbN/zxxk0DWue7RnR+QxKGtuuLAIc57Lh6zTiq3BAipeJXCu0rRJ2zbB 83tblxYFQ0fQZn5gnLqAMaiipTMnEfmqvZngHufNmT7vTeEAQAf0ADd5o+DO332B07jg WWcsHqIf7ItesgPBVld1k4t6UBr51zwlXHWrCp5R4K2mZar/IxnJIsRvRihKoAa5k0Hu sL+KdF1LNXILhgf6tTOj+6lAMLQpHroXfe0EU5ltEQFWnbb02QCgJk3AxugDm9kXDdm5 Kkug== 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=OiNMlnQB8VGQjohFJnPAFnU5AP88BYqvWh/8rHE0euA=; b=M7Ob/WDIZ7Tu6AnOlFB/Y9Quvqt+k43imPJf4DDR5gdf7vQPgiBO5PExUDhRI9ni0G faGTJ+kvPRQf3B8PlPmO6zleKub9LfJoDxXxEAfWyNer+2n30Ci9lLG2v58dxfeYAkLo qAYj24f6q1+kN3uBl5V+qxUrUlXuuTIHUq1JanHIkThihCjrwYEg2+7co1ONjKjKOoEC nEimRHrRIA6lV8uG78x4SI+lNUB6FAr7Ym6l7/xhLLXClPnD23vrm7BJhU/Q/TeblLsN PtRxzp/JobLxTKS7CiavaKqkrEl+xCkDzxOielA1jIerCe59wIHHm6QYKxc3Bgel57Mr CDrQ== X-Gm-Message-State: AHYfb5hphPFJ7jq9H1JCpdZqczAkzQL2c5FDRL7w8VT70TVF/dgNonHF ZtgrX1z/T5RnYQ== X-Received: by 10.98.134.198 with SMTP id x189mr683053pfd.129.1502961414639; Thu, 17 Aug 2017 02:16:54 -0700 (PDT) Received: from gmail.com ([117.196.97.196]) by smtp.gmail.com with ESMTPSA id v78sm6623664pfd.121.2017.08.17.02.16.49 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 17 Aug 2017 02:16:54 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Thu, 17 Aug 2017 14:46:46 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, linux@armlinux.org.uk, perex@perex.cz, tiwai@suse.com, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 17 Aug 2017 14:45:51 +0530 Message-Id: <1502961360-22063-4-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502961360-22063-1-git-send-email-bhumirks@gmail.com> References: <1502961360-22063-1-git-send-email-bhumirks@gmail.com> Cc: Bhumika Goyal Subject: [alsa-devel] [PATCH 03/12] ALSA: drivers: make snd_pcm_hardware const 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 Make these const as they are only used in a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- sound/drivers/aloop.c | 2 +- sound/drivers/dummy.c | 2 +- sound/drivers/ml403-ac97cr.c | 4 ++-- sound/drivers/pcsp/pcsp_lib.c | 2 +- sound/drivers/vx/vx_pcm.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index 54f348a..6e02ee0 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c @@ -561,7 +561,7 @@ static snd_pcm_uframes_t loopback_pointer(struct snd_pcm_substream *substream) return bytes_to_frames(runtime, pos); } -static struct snd_pcm_hardware loopback_pcm_hardware = +static const struct snd_pcm_hardware loopback_pcm_hardware = { .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE | diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index dd5ed03..c0939a0 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -520,7 +520,7 @@ static snd_pcm_uframes_t dummy_pcm_pointer(struct snd_pcm_substream *substream) return get_dummy_ops(substream)->pointer(substream); } -static struct snd_pcm_hardware dummy_pcm_hardware = { +static const struct snd_pcm_hardware dummy_pcm_hardware = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_RESUME | diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c index bdcb572..d634e10 100644 --- a/sound/drivers/ml403-ac97cr.c +++ b/sound/drivers/ml403-ac97cr.c @@ -373,7 +373,7 @@ struct snd_ml403_ac97cr { struct snd_pcm_indirect2 capture_ind2_rec; }; -static struct snd_pcm_hardware snd_ml403_ac97cr_playback = { +static const struct snd_pcm_hardware snd_ml403_ac97cr_playback = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP_VALID), @@ -392,7 +392,7 @@ struct snd_ml403_ac97cr { .fifo_size = 0, }; -static struct snd_pcm_hardware snd_ml403_ac97cr_capture = { +static const struct snd_pcm_hardware snd_ml403_ac97cr_capture = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP_VALID), diff --git a/sound/drivers/pcsp/pcsp_lib.c b/sound/drivers/pcsp/pcsp_lib.c index 44b3632..2f5a35f 100644 --- a/sound/drivers/pcsp/pcsp_lib.c +++ b/sound/drivers/pcsp/pcsp_lib.c @@ -285,7 +285,7 @@ static snd_pcm_uframes_t snd_pcsp_playback_pointer(struct snd_pcm_substream return bytes_to_frames(substream->runtime, pos); } -static struct snd_pcm_hardware snd_pcsp_playback = { +static const struct snd_pcm_hardware snd_pcsp_playback = { .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_HALF_DUPLEX | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index d318a33..380a028 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c @@ -500,7 +500,7 @@ static int vx_stop_stream(struct vx_core *chip, struct vx_pipe *pipe) * playback hw information */ -static struct snd_pcm_hardware vx_pcm_playback_hw = { +static const struct snd_pcm_hardware vx_pcm_playback_hw = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ /*SNDRV_PCM_INFO_RESUME*/), @@ -891,7 +891,7 @@ static int vx_pcm_prepare(struct snd_pcm_substream *subs) * playback hw information */ -static struct snd_pcm_hardware vx_pcm_capture_hw = { +static const struct snd_pcm_hardware vx_pcm_capture_hw = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ /*SNDRV_PCM_INFO_RESUME*/),