Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170159
b: refs/heads/master
c: 88439ac
h: refs/heads/master
i:
  170157: 9b2fc1c
  170155: 9f12698
  170151: f2cdf27
  170143: e447554
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Oct 1, 2009
1 parent a06f7b7 commit 73eeede
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17c86a32076f0119437a017de70a583431f4bf51
refs/heads/master: 88439ac793934a47f47ad285656b63d09f5937c8
1 change: 1 addition & 0 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ struct snd_soc_codec {
unsigned int num_dai;

#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_codec_root;
struct dentry *debugfs_reg;
struct dentry *debugfs_pop_time;
struct dentry *debugfs_dapm;
Expand Down
26 changes: 19 additions & 7 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,21 +1254,35 @@ static const struct file_operations codec_reg_fops = {

static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
{
char codec_root[128];

snprintf(codec_root, sizeof(codec_root),
"%s-%s", dev_name(codec->socdev->dev), codec->name);

codec->debugfs_codec_root = debugfs_create_dir(codec_root,
debugfs_root);
if (!codec->debugfs_codec_root) {
printk(KERN_WARNING
"ASoC: Failed to create codec debugfs directory\n");
return;
}

codec->debugfs_reg = debugfs_create_file("codec_reg", 0644,
debugfs_root, codec,
&codec_reg_fops);
codec->debugfs_codec_root,
codec, &codec_reg_fops);
if (!codec->debugfs_reg)
printk(KERN_WARNING
"ASoC: Failed to create codec register debugfs file\n");

codec->debugfs_pop_time = debugfs_create_u32("dapm_pop_time", 0744,
debugfs_root,
codec->debugfs_codec_root,
&codec->pop_time);
if (!codec->debugfs_pop_time)
printk(KERN_WARNING
"Failed to create pop time debugfs file\n");

codec->debugfs_dapm = debugfs_create_dir("dapm", debugfs_root);
codec->debugfs_dapm = debugfs_create_dir("dapm",
codec->debugfs_codec_root);
if (!codec->debugfs_dapm)
printk(KERN_WARNING
"Failed to create DAPM debugfs directory\n");
Expand All @@ -1278,9 +1292,7 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec)

static void soc_cleanup_codec_debugfs(struct snd_soc_codec *codec)
{
debugfs_remove_recursive(codec->debugfs_dapm);
debugfs_remove(codec->debugfs_pop_time);
debugfs_remove(codec->debugfs_reg);
debugfs_remove_recursive(codec->debugfs_codec_root);
}

#else
Expand Down

0 comments on commit 73eeede

Please sign in to comment.