alistair23-linux/drivers/staging/greybus/debugfs.c
Alex Elder 47ed2c9240 greybus: tag core init and exit functions
The top-level functions gb_init() and gb_exit() are tagged with
__init and __exit, respectively.  These functions call a few
other functions that are similarly used only at initialization
and termination time.  So mark those functions accordingly.

Note that, because gb_ap_exit() and gb_debugfs_cleanup()
are called by gb_init() in error paths, these functions
cannot be declared with the __exit attribute.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-06-10 10:38:23 -07:00

34 lines
556 B
C

/*
* Greybus debugfs code
*
* Copyright 2014 Google Inc.
* Copyright 2014 Linaro Ltd.
*
* Released under the GPLv2 only.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/debugfs.h>
#include "greybus.h"
static struct dentry *gb_debug_root;
void __init gb_debugfs_init(void)
{
gb_debug_root = debugfs_create_dir("greybus", NULL);
}
void gb_debugfs_cleanup(void)
{
debugfs_remove_recursive(gb_debug_root);
gb_debug_root = NULL;
}
struct dentry *gb_debugfs_get(void)
{
return gb_debug_root;
}
EXPORT_SYMBOL_GPL(gb_debugfs_get);