From patchwork Thu Aug 10 11:47:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9893353 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 EF66660384 for ; Thu, 10 Aug 2017 11:49:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0F9928AED for ; Thu, 10 Aug 2017 11:49:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3F4828AEF; Thu, 10 Aug 2017 11:49:55 +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 5822628AED for ; Thu, 10 Aug 2017 11:49:55 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 31C2C267551; Thu, 10 Aug 2017 13:48:37 +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 332B1267557; Thu, 10 Aug 2017 13:48:35 +0200 (CEST) Received: from mail-yw0-f193.google.com (mail-yw0-f193.google.com [209.85.161.193]) by alsa0.perex.cz (Postfix) with ESMTP id 7A3CA267541 for ; Thu, 10 Aug 2017 13:48:28 +0200 (CEST) Received: by mail-yw0-f193.google.com with SMTP id p68so263385ywg.5 for ; Thu, 10 Aug 2017 04:48:28 -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=6qNmNSmxzQq5zzzMY5B1NTQkYdgs3s6BgXcyczeL4rY=; b=ADXWC52DzFqcXCwyI1CjPrviwhn53FD+KlP/xiNZziAIFmEtSC1JWNpvnXY+Acrxed VJtrt1K1LuZiMGe/uvemMxlRfNRMEsGcnSIC4oTYRNtVvCft0xNdZudM2h/DXCunCxkA W+hl+t92hbt/AqqIg3VHLu3IlfE1Tlbjc5iZFmLjvX7Lfa5aqMyRay+7ZJofUr8gdnsy Ecurw3pE/a2qPjvDdHM1J4Yrml0CgYvyt74VTQmOUXABlNpMnONlGvzyvDtywt+JTGyv reFeMqEu8CrdmavaJi8DnmaL7vhrUIAv/9V9BrbIgsYyuxMnEvRmkaOqWhLGuPSXz5aG dL0Q== 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=6qNmNSmxzQq5zzzMY5B1NTQkYdgs3s6BgXcyczeL4rY=; b=dAhCaEbb5gyH+0a32woDCt9GhlqiLawLFAsYbWJYF56LhHXmGBn2wScVhGI7u/dZq/ 3yOtA1TuTZWNP1l5Gn0eVQcx3egyfadSWZ8RB8WlMs4irS+UG4nKWcblGoK3dR7i87nr MrsOzgGr1Z/8vGwY6cyf7W61STvSTJ5S4hBd6/K3q+2MNiOMsGhuR0OTKgzhtzDpu+y8 o0PJ/cgrzRHvX9EfVz/vpNKmxLen9ah/jzdUZFEQ/LA/4phsMDyVLoUe49dXi3fOP7KF JdEULbGXIM/Rhoz4xcKzwIQXqVP36SH4WFAGNy1ON0XvDsmP56MKvlDXaOT6zeHpDaGh tkYw== X-Gm-Message-State: AHYfb5j37GGK8dRdo2rgbHIWLtYfXX7l++LmdPRLgr/8IxXXqCn88TIF ZzBskQiLQZdssw== X-Received: by 10.37.194.132 with SMTP id s126mr8791783ybf.210.1502365707861; Thu, 10 Aug 2017 04:48:27 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id k2sm2126169ywk.96.2017.08.10.04.48.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Aug 2017 04:48:27 -0700 (PDT) From: Arvind Yadav To: perex@perex.cz, tiwai@suse.com Date: Thu, 10 Aug 2017 17:17:38 +0530 Message-Id: <1502365658-24723-8-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502365658-24723-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1502365658-24723-1-git-send-email-arvind.yadav.cs@gmail.com> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH 7/7] ALSA: trident: 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/pci/trident/trident_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index 64d3b8e..4561040 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c @@ -2093,7 +2093,7 @@ static int snd_trident_foldback_close(struct snd_pcm_substream *substream) .page = snd_pcm_sgbuf_ops_page, }; -static struct snd_pcm_ops snd_trident_capture_ops = { +static const struct snd_pcm_ops snd_trident_capture_ops = { .open = snd_trident_capture_open, .close = snd_trident_capture_close, .ioctl = snd_trident_ioctl, @@ -2104,7 +2104,7 @@ static int snd_trident_foldback_close(struct snd_pcm_substream *substream) .pointer = snd_trident_capture_pointer, }; -static struct snd_pcm_ops snd_trident_si7018_capture_ops = { +static const struct snd_pcm_ops snd_trident_si7018_capture_ops = { .open = snd_trident_capture_open, .close = snd_trident_capture_close, .ioctl = snd_trident_ioctl,