summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-08-04 19:31:05 +0400
committerMark Brown <broonie@linaro.org>2014-08-04 19:31:05 +0400
commitf0d766adbcac4eff4a114844b56d64aef1b8f5cd (patch)
treef8099e682afb9ef30d3770700c28b8cc8a042711 /sound/soc/soc-core.c
parent4a226ec97d797f4be486aab93458fc56a7d4de8c (diff)
parentd0ab92d63cd6df4c47d93940bd5e4e7737fa4909 (diff)
downloadlinux-f0d766adbcac4eff4a114844b56d64aef1b8f5cd.tar.xz
Merge tag 'asoc-v3.16-rc5' into asoc-linus
ASoC: Fixes for v3.16 A bigger batch of changes than I would like as I didn't send any for a few weeks without noticing how many had built up. They are almost all driver specific though, larger changes are: - Fixes to the newly added Baytrail/MAX98090 which look like some QA was missed on the microphone detection. - Deletion of some erroniously listed audio formats for Haswell. - Fix debugfs creation in the core so that we don't try to generate multiple directories with the same name, relatively large textually but simple to inspect by eye and test. - A couple of bugfixes for the rcar driver one of which which involves a bit of code motion to move initailisation of some hardware out of common paths into device specific ones. - Ensure both channels are powered up for mono outputs on Arizona devices, involving some simple data tables listing the outputs and a loop over them. - A couple of fixes to save and restore information on suspended and idle Samsung I2S controllers. # gpg: Signature made Tue 22 Jul 2014 00:52:53 BST using RSA key ID 7EA229BD # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b87d7d882e6d..91120b8e283e 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -270,12 +270,32 @@ static const struct file_operations codec_reg_fops = {
.llseek = default_llseek,
};
+static struct dentry *soc_debugfs_create_dir(struct dentry *parent,
+ const char *fmt, ...)
+{
+ struct dentry *de;
+ va_list ap;
+ char *s;
+
+ va_start(ap, fmt);
+ s = kvasprintf(GFP_KERNEL, fmt, ap);
+ va_end(ap);
+
+ if (!s)
+ return NULL;
+
+ de = debugfs_create_dir(s, parent);
+ kfree(s);
+
+ return de;
+}
+
static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
{
struct dentry *debugfs_card_root = codec->card->debugfs_card_root;
- codec->debugfs_codec_root = debugfs_create_dir(codec->name,
- debugfs_card_root);
+ codec->debugfs_codec_root = soc_debugfs_create_dir(debugfs_card_root,
+ "codec:%s", codec->name);
if (!codec->debugfs_codec_root) {
dev_warn(codec->dev,
"ASoC: Failed to create codec debugfs directory\n");
@@ -306,8 +326,8 @@ static void soc_init_platform_debugfs(struct snd_soc_platform *platform)
{
struct dentry *debugfs_card_root = platform->card->debugfs_card_root;
- platform->debugfs_platform_root = debugfs_create_dir(platform->name,
- debugfs_card_root);
+ platform->debugfs_platform_root = soc_debugfs_create_dir(debugfs_card_root,
+ "platform:%s", platform->name);
if (!platform->debugfs_platform_root) {
dev_warn(platform->dev,
"ASoC: Failed to create platform debugfs directory\n");