debugfs.c 511 B

1234567891011121314151617181920212223242526272829303132
  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. #include <linux/debugfs.h>
  10. #include "greybus.h"
  11. static struct dentry *gb_debug_root;
  12. void __init gb_debugfs_init(void)
  13. {
  14. gb_debug_root = debugfs_create_dir("greybus", NULL);
  15. }
  16. void gb_debugfs_cleanup(void)
  17. {
  18. debugfs_remove_recursive(gb_debug_root);
  19. gb_debug_root = NULL;
  20. }
  21. struct dentry *gb_debugfs_get(void)
  22. {
  23. return gb_debug_root;
  24. }
  25. EXPORT_SYMBOL_GPL(gb_debugfs_get);