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: 9905421 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 EE97460244 for ; Thu, 17 Aug 2017 09:20:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEDEC285FF for ; Thu, 17 Aug 2017 09:20:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3BBB28AD6; Thu, 17 Aug 2017 09:20:32 +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=-4.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 901EC285FF for ; Thu, 17 Aug 2017 09:20:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751055AbdHQJQ5 (ORCPT ); Thu, 17 Aug 2017 05:16:57 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:38663 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750959AbdHQJQz (ORCPT ); Thu, 17 Aug 2017 05:16:55 -0400 Received: by mail-pg0-f67.google.com with SMTP id 123so8900827pga.5; 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=aboWBo2anArGiQR6kRiHRFiRk8OAiYnL1sD2lT3Uziqt67pJUpCAI1YeccwCarJ8xd gaVJGZQcwilnXBC2K6+kd4PtZGOsS4rlZNWNdNA8k8jA4mnzYSIy20TTiV//yf+VEMMm iHIPuJyB1w/eOnTM/c24gUOmypCnRjFdS3nBcy0J/fPfUjyy25m5K2zOiMJWTDrrPm8m hWTbWMBD0L9B6+E+tfHYsFGQd3fGWBBwVeMeKNQ0Pfc9Fjy4pxrbCAfM6oQWqusDTyWN hMlExyQaYVIszeUhHlr8NXTqSLoqde48ZMwOTnCzzfhGpakynqspIJsADOy69BbIaN0x UNSA== X-Gm-Message-State: AHYfb5igQtOv4BOdd3FGTZfS7yK5BPg+mFBewRHxokdjDOAze4jayDie gd6Ic/5waZ1Q8A== 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 Cc: Bhumika Goyal Subject: [PATCH 03/12] ALSA: drivers: make snd_pcm_hardware const 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> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.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*/),