From patchwork Fri Aug 11 11:57:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9895629 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 747D8603B4 for ; Fri, 11 Aug 2017 11:59:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64BA728BEB for ; Fri, 11 Aug 2017 11:59:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59C2C28C1F; Fri, 11 Aug 2017 11:59:05 +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 A297D28BF2 for ; Fri, 11 Aug 2017 11:59:04 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CBF6D266ED5; Fri, 11 Aug 2017 13:58:47 +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 ACEA2266ED5; Fri, 11 Aug 2017 13:58:46 +0200 (CEST) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by alsa0.perex.cz (Postfix) with ESMTP id 01D4C26648D for ; Fri, 11 Aug 2017 13:58:42 +0200 (CEST) Received: by mail-pf0-f193.google.com with SMTP id p13so3303351pfd.4 for ; Fri, 11 Aug 2017 04:58:42 -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=lKTRFSp23blXWrDu1woHwstYkrKmUNAP37Qz+G1+mwM=; b=dxPQWDB8YLYCKIvx29gfUShsVHzw9soTSn6Amp/xRIqYFJhPpTckM6B+ntumjMQoMH NkR4LjO//wZU0bFWL9dCNeWBqYjgPtKJ3jc+P/ed58hO4qGD/GrwpHC0IXzWIUnP9OyO /eXZ/cFM4TNREYkwTFkcpaG77EjmaybnYbqcFso7pm2K7BGMrdsjh44y3zClWy6mHsWW Acgdrc6KFq7gO9fg+9f9NTqG36kCJH3Ny2lcdxFsULJhCwJsIrVK7oAWnB5lZAbril+2 zLqOZvN+bOylMsX3BZOnAlwiuz0gEClPUW+d+L+HG8lTxZ1bjp8f0RzKVy1XOA02qD5i B4fw== 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=lKTRFSp23blXWrDu1woHwstYkrKmUNAP37Qz+G1+mwM=; b=g78Z9WjXQCFOfzwagcwrTpt3gWIZu+j9rivKaaRE/pY6xjhqGED/5SO9vDRPZeltTL F55V1/7PK4xNokax114OgPITU66+0pe91Ba0/1QPGrRZ/BxtFZNFZGTyCLGr6HrXtt9v sui0pZwZp1Y6XMD/U+VH5VKfl/j1yQjQrO/jLOg7IF/duFw8MI0xmoeb0e+lzK9nvSvH jDj2BUsj+E0nhfAMNqcs9C/1V6MsvMD8TMEiH1StiYlg8p6tRln3dqkMH0+j3pb1gnx2 l8QT+/qseqXzIt/LSBrzgeW88+U7mvza78akbTCiiptHCBXbfSS0qzgfpHU7RSiVegRH tcOg== X-Gm-Message-State: AHYfb5jQKEbWcfiPGdUbJ3f57Kehexi6qdT7JLjg6J9/cEr8PK4WWiDM oCtezqpuelguTQ== X-Received: by 10.84.215.203 with SMTP id g11mr17841678plj.462.1502452721872; Fri, 11 Aug 2017 04:58:41 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id o5sm1717482pfb.184.2017.08.11.04.58.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Aug 2017 04:58:41 -0700 (PDT) From: Arvind Yadav To: perex@perex.cz, tiwai@suse.com Date: Fri, 11 Aug 2017 17:27:59 +0530 Message-Id: <1502452687-8202-2-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502452687-8202-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1502452687-8202-1-git-send-email-arvind.yadav.cs@gmail.com> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH 1/9] ALSA: ad1816a: 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/isa/ad1816a/ad1816a_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c index 5c815f5..5c6df15 100644 --- a/sound/isa/ad1816a/ad1816a_lib.c +++ b/sound/isa/ad1816a/ad1816a_lib.c @@ -653,7 +653,7 @@ int snd_ad1816a_create(struct snd_card *card, return 0; } -static struct snd_pcm_ops snd_ad1816a_playback_ops = { +static const struct snd_pcm_ops snd_ad1816a_playback_ops = { .open = snd_ad1816a_playback_open, .close = snd_ad1816a_playback_close, .ioctl = snd_pcm_lib_ioctl, @@ -664,7 +664,7 @@ int snd_ad1816a_create(struct snd_card *card, .pointer = snd_ad1816a_playback_pointer, }; -static struct snd_pcm_ops snd_ad1816a_capture_ops = { +static const struct snd_pcm_ops snd_ad1816a_capture_ops = { .open = snd_ad1816a_capture_open, .close = snd_ad1816a_capture_close, .ioctl = snd_pcm_lib_ioctl,