debugfs.c (7ae9fb1b7ecbb5d85d07857943f677fd1a559b18) debugfs.c (2a1d18a5dc5056825b8e9527d188130da6256efc)
1// SPDX-License-Identifier: GPL-2.0-only
2#include <linux/debugfs.h>
3#include <linux/ras.h>
4#include "debugfs.h"
5
6struct dentry *ras_debugfs_dir;
7
8static atomic_t trace_count = ATOMIC_INIT(0);

--- 32 unchanged lines hidden (view full) ---

41{
42 struct dentry *fentry;
43
44 if (!ras_debugfs_dir)
45 return -ENOENT;
46
47 fentry = debugfs_create_file("daemon_active", S_IRUSR, ras_debugfs_dir,
48 NULL, &trace_fops);
1// SPDX-License-Identifier: GPL-2.0-only
2#include <linux/debugfs.h>
3#include <linux/ras.h>
4#include "debugfs.h"
5
6struct dentry *ras_debugfs_dir;
7
8static atomic_t trace_count = ATOMIC_INIT(0);

--- 32 unchanged lines hidden (view full) ---

41{
42 struct dentry *fentry;
43
44 if (!ras_debugfs_dir)
45 return -ENOENT;
46
47 fentry = debugfs_create_file("daemon_active", S_IRUSR, ras_debugfs_dir,
48 NULL, &trace_fops);
49 if (!fentry)
49 if (IS_ERR(fentry))
50 return -ENODEV;
51
52 return 0;
53
54}
55
56void __init ras_debugfs_init(void)
57{
58 ras_debugfs_dir = debugfs_create_dir("ras", NULL);
59}
50 return -ENODEV;
51
52 return 0;
53
54}
55
56void __init ras_debugfs_init(void)
57{
58 ras_debugfs_dir = debugfs_create_dir("ras", NULL);
59}