summaryrefslogtreecommitdiff
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 958967d141ee..9ad397050471 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -358,6 +358,18 @@ static void clk_debug_unregister(struct clk *clk)
debugfs_remove_recursive(clk->dentry);
}
+struct dentry *clk_debugfs_add_file(struct clk *clk, char *name, umode_t mode,
+ void *data, const struct file_operations *fops)
+{
+ struct dentry *d = NULL;
+
+ if (clk->dentry)
+ d = debugfs_create_file(name, mode, clk->dentry, data, fops);
+
+ return d;
+}
+EXPORT_SYMBOL_GPL(clk_debugfs_add_file);
+
/**
* clk_debug_init - lazily create the debugfs clk tree visualization
*