mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: perex@perex.cz, tiwai@suse.com
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH 7/9] ALSA: sb16: constify snd_pcm_ops structures
Date: Fri, 11 Aug 2017 17:28:05 +0530	[thread overview]
Message-ID: <1502452687-8202-8-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1502452687-8202-1-git-send-email-arvind.yadav.cs@gmail.com>

snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/isa/sb/sb16_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c
index 4be1350..6fc6325 100644
--- a/sound/isa/sb/sb16_main.c
+++ b/sound/isa/sb/sb16_main.c
@@ -838,7 +838,7 @@ int snd_sb16dsp_configure(struct snd_sb * chip)
 	return 0;
 }
 
-static struct snd_pcm_ops snd_sb16_playback_ops = {
+static const struct snd_pcm_ops snd_sb16_playback_ops = {
 	.open =		snd_sb16_playback_open,
 	.close =	snd_sb16_playback_close,
 	.ioctl =	snd_pcm_lib_ioctl,
@@ -849,7 +849,7 @@ int snd_sb16dsp_configure(struct snd_sb * chip)
 	.pointer =	snd_sb16_playback_pointer,
 };
 
-static struct snd_pcm_ops snd_sb16_capture_ops = {
+static const struct snd_pcm_ops snd_sb16_capture_ops = {
 	.open =		snd_sb16_capture_open,
 	.close =	snd_sb16_capture_close,
 	.ioctl =	snd_pcm_lib_ioctl,
-- 
1.9.1

  parent reply	other threads:[~2017-08-11 11:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-11 11:57 [PATCH 0/9] constify isa " Arvind Yadav
2017-08-11 11:57 ` [PATCH 1/9] ALSA: ad1816a: constify " Arvind Yadav
2017-08-11 11:58 ` [PATCH 2/9] ALSA: es1688: " Arvind Yadav
2017-08-11 11:58 ` [PATCH 3/9] ALSA: es18xx: " Arvind Yadav
2017-08-11 11:58 ` [PATCH 4/9] ALSA: gus: " Arvind Yadav
2017-08-11 11:58 ` [PATCH 5/9] ALSA: msnd: " Arvind Yadav
2017-08-11 11:58 ` [PATCH 6/9] ALSA: emu8000: " Arvind Yadav
2017-08-11 11:58 ` Arvind Yadav [this message]
2017-08-11 11:58 ` [PATCH 8/9] ALSA: sb8: " Arvind Yadav
2017-08-11 11:58 ` [PATCH 9/9] ALSA: wss: " Arvind Yadav
2017-08-12 21:45 ` [PATCH 0/9] constify isa " Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1502452687-8202-8-git-send-email-arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®