summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm_adsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r--sound/soc/codecs/wm_adsp.c42
1 files changed, 8 insertions, 34 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index b26e6b825a90..f5fbadc5e7e2 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -1,13 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* wm_adsp.c -- Wolfson ADSP support
*
* Copyright 2012 Wolfson Microelectronics plc
*
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
*/
#include <linux/ctype.h>
@@ -731,41 +728,18 @@ static void wm_adsp2_init_debugfs(struct wm_adsp *dsp,
struct dentry *root = NULL;
int i;
- if (!component->debugfs_root) {
- adsp_err(dsp, "No codec debugfs root\n");
- goto err;
- }
-
root = debugfs_create_dir(dsp->name, component->debugfs_root);
- if (!root)
- goto err;
-
- if (!debugfs_create_bool("booted", 0444, root, &dsp->booted))
- goto err;
-
- if (!debugfs_create_bool("running", 0444, root, &dsp->running))
- goto err;
-
- if (!debugfs_create_x32("fw_id", 0444, root, &dsp->fw_id))
- goto err;
+ debugfs_create_bool("booted", 0444, root, &dsp->booted);
+ debugfs_create_bool("running", 0444, root, &dsp->running);
+ debugfs_create_x32("fw_id", 0444, root, &dsp->fw_id);
+ debugfs_create_x32("fw_version", 0444, root, &dsp->fw_id_version);
- if (!debugfs_create_x32("fw_version", 0444, root, &dsp->fw_id_version))
- goto err;
-
- for (i = 0; i < ARRAY_SIZE(wm_adsp_debugfs_fops); ++i) {
- if (!debugfs_create_file(wm_adsp_debugfs_fops[i].name,
- 0444, root, dsp,
- &wm_adsp_debugfs_fops[i].fops))
- goto err;
- }
+ for (i = 0; i < ARRAY_SIZE(wm_adsp_debugfs_fops); ++i)
+ debugfs_create_file(wm_adsp_debugfs_fops[i].name, 0444, root,
+ dsp, &wm_adsp_debugfs_fops[i].fops);
dsp->debugfs_root = root;
- return;
-
-err:
- debugfs_remove_recursive(root);
- adsp_err(dsp, "Failed to create debugfs\n");
}
static void wm_adsp2_cleanup_debugfs(struct wm_adsp *dsp)