From patchwork Sun Aug 13 12:43:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9897787 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 4718F60244 for ; Sun, 13 Aug 2017 12:46:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3ABCF286B3 for ; Sun, 13 Aug 2017 12:46:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38E86286B4; Sun, 13 Aug 2017 12:46:13 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 CDC15286C7 for ; Sun, 13 Aug 2017 12:46:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752050AbdHMMoG (ORCPT ); Sun, 13 Aug 2017 08:44:06 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:38348 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752018AbdHMMoD (ORCPT ); Sun, 13 Aug 2017 08:44:03 -0400 Received: by mail-pg0-f65.google.com with SMTP id 123so6613850pga.5; Sun, 13 Aug 2017 05:44: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=7i/qOw/Jjg6Cp/tHl+dT/cSJ0ifPKEZn2BkcEVxacgA=; b=ATNp5WFeEyGKjJhYymQENw7I0z5IA2qSQ4E0fGB9Q9G7bIIbbV8RzpyidZqVNJa3yA 0+EimNtDwxq1ScdJo9r5lfN7K7Qk6lPn6dBGcPmNz8y4VteW7Fwd6RXRou2/VY4wr3/g 7Nmpo2qbmesu8VBvEGkYLuqhOLWKnR33d4J80FLpcIXB0wvZ2DRAQ6OVX1wHzFRYYVj3 T4SEh0UQMDDHmElQoG09b3X1YBZzjpmh0eW4IJITWSG5gnLWu6EsSRiFKZ8F2qwW0H+y AttlGFiQmSX74BYUOTug5r7NhlN09LKFnloZOHBfKB5iqy1+lMp23WLvHWOSymsbw++j gwFA== 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=7i/qOw/Jjg6Cp/tHl+dT/cSJ0ifPKEZn2BkcEVxacgA=; b=Npe5VuCqKoQOa8qC0zfx6aGurgohmQ2wzu9RsY5d1y7gC71m/Bzuf/ne+F2fyv6awa AyV2SMhABWGr9d5onPt5O2ttXcBlE4UFDeVTBE4gMYhTkSSh2IKTd9X5tix7Xja96kpd ohH8SQhmwfjUpj8wXj59KaIZwuSEwMSa+uXiL16i2CAuJsNMLIRhRocaES+hjoLMPZB7 Yky1UaOzhkfQpLSpeAfANX27GqhWC7xSNhd5EB5V5lTr491n8XfWPqXsIz4lS6EMmBdS lkJdndhg8+P6qZr4lxvkKQH2OmI+puGkhkFChTttf1OyvuPbDs6HtUV4zvNl7O092aU/ p6hg== X-Gm-Message-State: AHYfb5id54blyCy0A5UNBj9nzu8b82sGrc5Ll4bNn1dQGw79bSwdtP6a 24bBpi9cItyfDw== X-Received: by 10.84.164.193 with SMTP id l1mr25076445plg.279.1502628242730; Sun, 13 Aug 2017 05:44:02 -0700 (PDT) Received: from gmail.com ([2405:204:818a:ee90:a033:dadd:1a39:1760]) by smtp.gmail.com with ESMTPSA id 66sm9382337pfb.149.2017.08.13.05.43.52 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 13 Aug 2017 05:44:02 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Sun, 13 Aug 2017 18:13:48 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, airlied@linux.ie, hans.verkuil@cisco.com, mchehab@kernel.org, awalls@md.metrocast.net, mkrufky@linuxtv.org, eric@anholt.net, stefan.wahren@i2se.com, gregkh@linuxfoundation.org, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, balbi@kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-usb@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH 2/6] [media] pci: make snd_pcm_hardware const Date: Sun, 13 Aug 2017 18:13:09 +0530 Message-Id: <1502628193-3343-3-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502628193-3343-1-git-send-email-bhumirks@gmail.com> References: <1502628193-3343-1-git-send-email-bhumirks@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- drivers/media/pci/cobalt/cobalt-alsa-pcm.c | 4 ++-- drivers/media/pci/cx18/cx18-alsa-pcm.c | 2 +- drivers/media/pci/cx23885/cx23885-alsa.c | 2 +- drivers/media/pci/cx25821/cx25821-alsa.c | 2 +- drivers/media/pci/ivtv/ivtv-alsa-pcm.c | 2 +- drivers/media/pci/saa7134/saa7134-alsa.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/media/pci/cobalt/cobalt-alsa-pcm.c b/drivers/media/pci/cobalt/cobalt-alsa-pcm.c index 49013c6..b69b258 100644 --- a/drivers/media/pci/cobalt/cobalt-alsa-pcm.c +++ b/drivers/media/pci/cobalt/cobalt-alsa-pcm.c @@ -43,7 +43,7 @@ pr_info("cobalt-alsa-pcm %s: " fmt, __func__, ##arg); \ } while (0) -static struct snd_pcm_hardware snd_cobalt_hdmi_capture = { +static const struct snd_pcm_hardware snd_cobalt_hdmi_capture = { .info = SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | @@ -64,7 +64,7 @@ .periods_max = 4, }; -static struct snd_pcm_hardware snd_cobalt_playback = { +static const struct snd_pcm_hardware snd_cobalt_playback = { .info = SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | diff --git a/drivers/media/pci/cx18/cx18-alsa-pcm.c b/drivers/media/pci/cx18/cx18-alsa-pcm.c index f68ee57..aadd764 100644 --- a/drivers/media/pci/cx18/cx18-alsa-pcm.c +++ b/drivers/media/pci/cx18/cx18-alsa-pcm.c @@ -44,7 +44,7 @@ __func__, ##arg); \ } while (0) -static struct snd_pcm_hardware snd_cx18_hw_capture = { +static const struct snd_pcm_hardware snd_cx18_hw_capture = { .info = SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | diff --git a/drivers/media/pci/cx23885/cx23885-alsa.c b/drivers/media/pci/cx23885/cx23885-alsa.c index c148f9a..d8c3637 100644 --- a/drivers/media/pci/cx23885/cx23885-alsa.c +++ b/drivers/media/pci/cx23885/cx23885-alsa.c @@ -293,7 +293,7 @@ static int dsp_buffer_free(struct cx23885_audio_dev *chip) */ #define DEFAULT_FIFO_SIZE 4096 -static struct snd_pcm_hardware snd_cx23885_digital_hw = { +static const struct snd_pcm_hardware snd_cx23885_digital_hw = { .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | diff --git a/drivers/media/pci/cx25821/cx25821-alsa.c b/drivers/media/pci/cx25821/cx25821-alsa.c index 519b81c..2b34990 100644 --- a/drivers/media/pci/cx25821/cx25821-alsa.c +++ b/drivers/media/pci/cx25821/cx25821-alsa.c @@ -428,7 +428,7 @@ static int dsp_buffer_free(struct cx25821_audio_dev *chip) * Digital hardware definition */ #define DEFAULT_FIFO_SIZE 384 -static struct snd_pcm_hardware snd_cx25821_digital_hw = { +static const struct snd_pcm_hardware snd_cx25821_digital_hw = { .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID, .formats = SNDRV_PCM_FMTBIT_S16_LE, diff --git a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c index 417d03d..5326d86 100644 --- a/drivers/media/pci/ivtv/ivtv-alsa-pcm.c +++ b/drivers/media/pci/ivtv/ivtv-alsa-pcm.c @@ -41,7 +41,7 @@ pr_info("ivtv-alsa-pcm %s: " fmt, __func__, ##arg); \ } while (0) -static struct snd_pcm_hardware snd_ivtv_hw_capture = { +static const struct snd_pcm_hardware snd_ivtv_hw_capture = { .info = SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | diff --git a/drivers/media/pci/saa7134/saa7134-alsa.c b/drivers/media/pci/saa7134/saa7134-alsa.c index bf358ec..c59b69f 100644 --- a/drivers/media/pci/saa7134/saa7134-alsa.c +++ b/drivers/media/pci/saa7134/saa7134-alsa.c @@ -627,7 +627,7 @@ static int snd_card_saa7134_capture_prepare(struct snd_pcm_substream * substream * switching to 32kHz without any frequency translation */ -static struct snd_pcm_hardware snd_card_saa7134_capture = +static const struct snd_pcm_hardware snd_card_saa7134_capture = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |