debugfs.c 515 B

1234567891011121314151617181920212223242526272829
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Greybus debugfs code
  4. *
  5. * Copyright 2014 Google Inc.
  6. * Copyright 2014 Linaro Ltd.
  7. */
  8. #include <linux/debugfs.h>
  9. #include <linux/greybus.h>
  10. static struct dentry *gb_debug_root;
  11. void __init gb_debugfs_init(void)
  12. {
  13. gb_debug_root = debugfs_create_dir("greybus", NULL);
  14. }
  15. void gb_debugfs_cleanup(void)
  16. {
  17. debugfs_remove_recursive(gb_debug_root);
  18. gb_debug_root = NULL;
  19. }
  20. struct dentry *gb_debugfs_get(void)
  21. {
  22. return gb_debug_root;
  23. }
  24. EXPORT_SYMBOL_GPL(gb_debugfs_get);