All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Blechmann <tim@klingt.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: [PATCH] alsa: snd_pcm_new api cleanup
Date: Thu, 5 Feb 2009 13:01:54 +0100	[thread overview]
Message-ID: <20090205130154.2839e1cc@thinkpad> (raw)
In-Reply-To: <s5hfxit6s0m.wl%tiwai@suse.de>

Impact: cleanup

snd_pcm_new takes a char *id argument, although it is not modifying
the string. it can therefore be declared as const char *id.

Signed-off-by: Tim Blechmann <tim@klingt.org>
---
 include/sound/pcm.h |    2 +-
 sound/core/pcm.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 40c5a6f..ee0e887 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -451,7 +451,7 @@ struct snd_pcm_notify {
 
 extern const struct file_operations snd_pcm_f_ops[2];
 
-int snd_pcm_new(struct snd_card *card, char *id, int device,
+int snd_pcm_new(struct snd_card *card, const char *id, int device,
 		int playback_count, int capture_count,
 		struct snd_pcm **rpcm);
 int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count);
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 192a433..583453e 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -692,7 +692,7 @@ EXPORT_SYMBOL(snd_pcm_new_stream);
  *
  * Returns zero if successful, or a negative error code on failure.
  */
-int snd_pcm_new(struct snd_card *card, char *id, int device,
+int snd_pcm_new(struct snd_card *card, const char *id, int device,
 		int playback_count, int capture_count,
 	        struct snd_pcm ** rpcm)
 {
-- 
1.5.6.3

  reply	other threads:[~2009-02-05 12:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-05 11:27 [PATCH] alsa: snd_pcm_new api cleanup Tim Blechmann
2009-02-05 11:29 ` Takashi Iwai
2009-02-05 12:01   ` Tim Blechmann [this message]
2009-02-05 14:38     ` Takashi Iwai
2009-02-05 12:04   ` Tim Blechmann

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=20090205130154.2839e1cc@thinkpad \
    --to=tim@klingt.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.