Linux-libre 4.9.46-gnu
[librecmc/linux-libre.git] / drivers / staging / greybus / debugfs.c
1 /*
2  * Greybus debugfs code
3  *
4  * Copyright 2014 Google Inc.
5  * Copyright 2014 Linaro Ltd.
6  *
7  * Released under the GPLv2 only.
8  */
9
10 #include <linux/debugfs.h>
11
12 #include "greybus.h"
13
14 static struct dentry *gb_debug_root;
15
16 void __init gb_debugfs_init(void)
17 {
18         gb_debug_root = debugfs_create_dir("greybus", NULL);
19 }
20
21 void gb_debugfs_cleanup(void)
22 {
23         debugfs_remove_recursive(gb_debug_root);
24         gb_debug_root = NULL;
25 }
26
27 struct dentry *gb_debugfs_get(void)
28 {
29         return gb_debug_root;
30 }
31 EXPORT_SYMBOL_GPL(gb_debugfs_get);