aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/pcm.c')
-rw-r--r--sound/core/pcm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index b25bcf5b8644..02bd96954dc4 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -1027,7 +1027,8 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream)
1027static ssize_t show_pcm_class(struct device *dev, 1027static ssize_t show_pcm_class(struct device *dev,
1028 struct device_attribute *attr, char *buf) 1028 struct device_attribute *attr, char *buf)
1029{ 1029{
1030 struct snd_pcm *pcm; 1030 struct snd_pcm_str *pstr = container_of(dev, struct snd_pcm_str, dev);
1031 struct snd_pcm *pcm = pstr->pcm;
1031 const char *str; 1032 const char *str;
1032 static const char *strs[SNDRV_PCM_CLASS_LAST + 1] = { 1033 static const char *strs[SNDRV_PCM_CLASS_LAST + 1] = {
1033 [SNDRV_PCM_CLASS_GENERIC] = "generic", 1034 [SNDRV_PCM_CLASS_GENERIC] = "generic",
@@ -1036,8 +1037,7 @@ static ssize_t show_pcm_class(struct device *dev,
1036 [SNDRV_PCM_CLASS_DIGITIZER] = "digitizer", 1037 [SNDRV_PCM_CLASS_DIGITIZER] = "digitizer",
1037 }; 1038 };
1038 1039
1039 if (! (pcm = dev_get_drvdata(dev)) || 1040 if (pcm->dev_class > SNDRV_PCM_CLASS_LAST)
1040 pcm->dev_class > SNDRV_PCM_CLASS_LAST)
1041 str = "none"; 1041 str = "none";
1042 else 1042 else
1043 str = strs[pcm->dev_class]; 1043 str = strs[pcm->dev_class];
@@ -1181,7 +1181,7 @@ int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree)
1181} 1181}
1182EXPORT_SYMBOL(snd_pcm_notify); 1182EXPORT_SYMBOL(snd_pcm_notify);
1183 1183
1184#ifdef CONFIG_PROC_FS 1184#ifdef CONFIG_SND_PROC_FS
1185/* 1185/*
1186 * Info interface 1186 * Info interface
1187 */ 1187 */
@@ -1227,10 +1227,10 @@ static void snd_pcm_proc_done(void)
1227 snd_info_free_entry(snd_pcm_proc_entry); 1227 snd_info_free_entry(snd_pcm_proc_entry);
1228} 1228}
1229 1229
1230#else /* !CONFIG_PROC_FS */ 1230#else /* !CONFIG_SND_PROC_FS */
1231#define snd_pcm_proc_init() 1231#define snd_pcm_proc_init()
1232#define snd_pcm_proc_done() 1232#define snd_pcm_proc_done()
1233#endif /* CONFIG_PROC_FS */ 1233#endif /* CONFIG_SND_PROC_FS */
1234 1234
1235 1235
1236/* 1236/*