diff options
author | Borislav Petkov (AMD) <bp@alien8.de> | 2024-03-01 08:37:46 -0600 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2024-03-01 16:55:10 +0100 |
commit | 9d2b6fa09d15d021fb83ec6f1336176ebaebbeec (patch) | |
tree | 31797afc1d79560dc0b72e54f5286256f6a91c38 /drivers/ras/debugfs.c | |
parent | dd61b55d733eee9bbe51abe7ab0e6f2ce1fae332 (diff) | |
download | lwn-9d2b6fa09d15d021fb83ec6f1336176ebaebbeec.tar.gz lwn-9d2b6fa09d15d021fb83ec6f1336176ebaebbeec.zip |
RAS: Export helper to get ras_debugfs_dir
Export a getter instead of the debugfs node directly so that, other
in-tree-only RAS modules can use it.
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Link: https://lore.kernel.org/r/20240301143748.854090-2-yazen.ghannam@amd.com
Diffstat (limited to 'drivers/ras/debugfs.c')
-rw-r--r-- | drivers/ras/debugfs.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/ras/debugfs.c b/drivers/ras/debugfs.c index ffb973c328e3..42afd3de68b2 100644 --- a/drivers/ras/debugfs.c +++ b/drivers/ras/debugfs.c @@ -3,10 +3,16 @@ #include <linux/ras.h> #include "debugfs.h" -struct dentry *ras_debugfs_dir; +static struct dentry *ras_debugfs_dir; static atomic_t trace_count = ATOMIC_INIT(0); +struct dentry *ras_get_debugfs_root(void) +{ + return ras_debugfs_dir; +} +EXPORT_SYMBOL_GPL(ras_get_debugfs_root); + int ras_userspace_consumers(void) { return atomic_read(&trace_count); |