debug.c 926 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Intel(R) Trace Hub driver debugging
  3. *
  4. * Copyright (C) 2014-2015 Intel Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms and conditions of the GNU General Public License,
  8. * version 2, as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. */
  15. #include <linux/types.h>
  16. #include <linux/device.h>
  17. #include <linux/debugfs.h>
  18. #include "intel_th.h"
  19. #include "debug.h"
  20. struct dentry *intel_th_dbg;
  21. void intel_th_debug_init(void)
  22. {
  23. intel_th_dbg = debugfs_create_dir("intel_th", NULL);
  24. if (IS_ERR(intel_th_dbg))
  25. intel_th_dbg = NULL;
  26. }
  27. void intel_th_debug_done(void)
  28. {
  29. debugfs_remove(intel_th_dbg);
  30. intel_th_dbg = NULL;
  31. }