diff options
-rw-r--r-- | include/sound/soc-dapm.h | 3 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 16 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 13 |
3 files changed, 14 insertions, 18 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index d5f1b9a9b8ff..f8a7c9a6f12a 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -356,7 +356,8 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card); | |||
356 | 356 | ||
357 | /* dapm sys fs - used by the core */ | 357 | /* dapm sys fs - used by the core */ |
358 | int snd_soc_dapm_sys_add(struct device *dev); | 358 | int snd_soc_dapm_sys_add(struct device *dev); |
359 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm); | 359 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, |
360 | struct dentry *parent); | ||
360 | 361 | ||
361 | /* dapm audio pin control and status */ | 362 | /* dapm audio pin control and status */ |
362 | int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, | 363 | int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 6a3cb53185cb..983ec640d4d7 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -302,13 +302,7 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec) | |||
302 | printk(KERN_WARNING | 302 | printk(KERN_WARNING |
303 | "ASoC: Failed to create codec register debugfs file\n"); | 303 | "ASoC: Failed to create codec register debugfs file\n"); |
304 | 304 | ||
305 | codec->dapm.debugfs_dapm = debugfs_create_dir("dapm", | 305 | snd_soc_dapm_debugfs_init(&codec->dapm, codec->debugfs_codec_root); |
306 | codec->debugfs_codec_root); | ||
307 | if (!codec->dapm.debugfs_dapm) | ||
308 | printk(KERN_WARNING | ||
309 | "Failed to create DAPM debugfs directory\n"); | ||
310 | |||
311 | snd_soc_dapm_debugfs_init(&codec->dapm); | ||
312 | } | 306 | } |
313 | 307 | ||
314 | static void soc_cleanup_codec_debugfs(struct snd_soc_codec *codec) | 308 | static void soc_cleanup_codec_debugfs(struct snd_soc_codec *codec) |
@@ -1926,13 +1920,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) | |||
1926 | card->num_dapm_routes); | 1920 | card->num_dapm_routes); |
1927 | 1921 | ||
1928 | #ifdef CONFIG_DEBUG_FS | 1922 | #ifdef CONFIG_DEBUG_FS |
1929 | card->dapm.debugfs_dapm = debugfs_create_dir("dapm", | 1923 | snd_soc_dapm_debugfs_init(&card->dapm, card->debugfs_card_root); |
1930 | card->debugfs_card_root); | ||
1931 | if (!card->dapm.debugfs_dapm) | ||
1932 | printk(KERN_WARNING | ||
1933 | "Failed to create card DAPM debugfs directory\n"); | ||
1934 | |||
1935 | snd_soc_dapm_debugfs_init(&card->dapm); | ||
1936 | #endif | 1924 | #endif |
1937 | 1925 | ||
1938 | snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname), | 1926 | snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname), |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 378f08adee56..ffed456b2142 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -1254,13 +1254,19 @@ static const struct file_operations dapm_bias_fops = { | |||
1254 | .llseek = default_llseek, | 1254 | .llseek = default_llseek, |
1255 | }; | 1255 | }; |
1256 | 1256 | ||
1257 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm) | 1257 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, |
1258 | struct dentry *parent) | ||
1258 | { | 1259 | { |
1259 | struct snd_soc_dapm_widget *w; | 1260 | struct snd_soc_dapm_widget *w; |
1260 | struct dentry *d; | 1261 | struct dentry *d; |
1261 | 1262 | ||
1262 | if (!dapm->debugfs_dapm) | 1263 | dapm->debugfs_dapm = debugfs_create_dir("dapm", parent); |
1264 | |||
1265 | if (!dapm->debugfs_dapm) { | ||
1266 | printk(KERN_WARNING | ||
1267 | "Failed to create DAPM debugfs directory\n"); | ||
1263 | return; | 1268 | return; |
1269 | } | ||
1264 | 1270 | ||
1265 | d = debugfs_create_file("bias_level", 0444, | 1271 | d = debugfs_create_file("bias_level", 0444, |
1266 | dapm->debugfs_dapm, dapm, | 1272 | dapm->debugfs_dapm, dapm, |
@@ -1283,7 +1289,8 @@ void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm) | |||
1283 | } | 1289 | } |
1284 | } | 1290 | } |
1285 | #else | 1291 | #else |
1286 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm) | 1292 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, |
1293 | struct dentry *parent) | ||
1287 | { | 1294 | { |
1288 | } | 1295 | } |
1289 | #endif | 1296 | #endif |