From patchwork Fri Aug 18 07:45:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9907785 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 32DBB60382 for ; Fri, 18 Aug 2017 07:49:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24C082885D for ; Fri, 18 Aug 2017 07:49:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17A8E28BEC; Fri, 18 Aug 2017 07:49:25 +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 6A1322885D for ; Fri, 18 Aug 2017 07:49:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 033522671EE; Fri, 18 Aug 2017 09:49:15 +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 676352671DE; Fri, 18 Aug 2017 09:49:13 +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 5C462267233 for ; Fri, 18 Aug 2017 09:45:48 +0200 (CEST) Received: by mail-pg0-f65.google.com with SMTP id t80so7641267pgb.2 for ; Fri, 18 Aug 2017 00:45:48 -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=nkL4C8vChqcJ0I2S+oGooPmwcxTwMqaRvohh+gNxY+c=; b=b1r4OpC1LP6j5FcpClH8QM3PbnjPElnCN4Ss+XW8PQ+D4Ag02rTWtlAdaP76eFRDU+ s3l28G8MCNs50sjrwHMNKmU7fENmtDi4HjCsxqw46DtTgt0YIBSRs+J2rhnEryJe0VJB SgdfYxNOEm+tA75OSxOlMXXgi7hkAKlHf+rViMkaH7OirvNyyUSaQKdZE9+7LwAweFXd Bkh0HIZSF4X8NDhc6CLpDIQD1ex9yFCvzlREH6VcOT2Ezcfx9PDoHm2vdnO3lmBHYNY+ 4loW3RsLfQjSiDyVWXohVg5ltFqGPcSrbJunAVYFHz1OtFmUPOAChU5bxBjiXJuKtf8v UqtA== 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=nkL4C8vChqcJ0I2S+oGooPmwcxTwMqaRvohh+gNxY+c=; b=EXW/Eph1UcO7SeEM8Eua2lskA8O7W8GA39iW2U9Wyxynqirqzv+bLriK8wbOeaa2e/ x3yecEP78VNOnFdPEBzdw4PlFOKb0jyKb/xItQeXVB3r2VN/MNLC8acyORCPfYFIKtKX TAyjNEEVLCAeYJN24hXiPSTERI1a3poRi4NyTnA+b7OwDgprKi1sDtqIrJWrwZbW6bBw ia0QMta7bBqVqtwbqsxX0VNSTbXpd3/fasdlVou7teFwEBrDggjjKDBiuuPEYbfAN6so pdUJsWuve+6hUBO37Xblxq16487iTuOCg2lyHrMyYIz5W8aozqIix5k47xQXjyboqpkv PlSw== X-Gm-Message-State: AHYfb5gFB03zlP2eVZxL/SXhxGO2pi7J8kri6xiULV7Qrh/UHm5z7U7i CqXA2FMx0ctqUQ== X-Received: by 10.84.217.206 with SMTP id d14mr2271564plj.319.1503042348017; Fri, 18 Aug 2017 00:45:48 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id h62sm11690482pfc.97.2017.08.18.00.45.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Aug 2017 00:45:47 -0700 (PDT) From: Arvind Yadav To: perex@perex.cz, tiwai@suse.com, johannes@sipsolutions.net, linux@armlinux.org.uk, daniel@zonque.org, clemens@ladisch.de Date: Fri, 18 Aug 2017 13:15:09 +0530 Message-Id: <1503042321-26758-2-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503042321-26758-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1503042321-26758-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/13] ALSA: aoa: 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/aoa/soundbus/i2sbus/pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/aoa/soundbus/i2sbus/pcm.c b/sound/aoa/soundbus/i2sbus/pcm.c index 053b09c..e618531 100644 --- a/sound/aoa/soundbus/i2sbus/pcm.c +++ b/sound/aoa/soundbus/i2sbus/pcm.c @@ -778,7 +778,7 @@ static snd_pcm_uframes_t i2sbus_playback_pointer(struct snd_pcm_substream return i2sbus_pcm_pointer(i2sdev, 0); } -static struct snd_pcm_ops i2sbus_playback_ops = { +static const struct snd_pcm_ops i2sbus_playback_ops = { .open = i2sbus_playback_open, .close = i2sbus_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -848,7 +848,7 @@ static snd_pcm_uframes_t i2sbus_record_pointer(struct snd_pcm_substream return i2sbus_pcm_pointer(i2sdev, 1); } -static struct snd_pcm_ops i2sbus_record_ops = { +static const struct snd_pcm_ops i2sbus_record_ops = { .open = i2sbus_record_open, .close = i2sbus_record_close, .ioctl = snd_pcm_lib_ioctl,