summaryrefslogtreecommitdiff
path: root/drivers/sipc/sipc_debugfs.c
blob: fae779f627bb13880451f91243b2d616ea2b7092 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * Copyright (C) 2012 Spreadtrum Communications Inc.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <asm/uaccess.h>

#include <linux/sipc.h>

#if defined(CONFIG_DEBUG_FS)

extern int sbuf_init_debugfs( void *root );
extern int smsg_init_debugfs( void *root );
extern int sblock_init_debugfs( void *root );
extern int smem_init_debugfs( void *root );

static int __init sipc_init_debugfs( void)
{
	struct dentry *root = debugfs_create_dir("sipc", NULL);
	if (!root)
		return -ENXIO;

	smsg_init_debugfs(root);
	sbuf_init_debugfs(root);
	sblock_init_debugfs(root);
	smem_init_debugfs(root);
	return 0;
}

__initcall(sipc_init_debugfs);

#endif /* CONFIG_DEBUG_FS */