s5p_mfc_debug.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * drivers/media/platform/s5p-mfc/s5p_mfc_debug.h
  3. *
  4. * Header file for Samsung MFC (Multi Function Codec - FIMV) driver
  5. * This file contains debug macros
  6. *
  7. * Kamil Debski, Copyright (c) 2011 Samsung Electronics
  8. * http://www.samsung.com/
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #ifndef S5P_MFC_DEBUG_H_
  15. #define S5P_MFC_DEBUG_H_
  16. #define DEBUG
  17. #ifdef DEBUG
  18. extern int mfc_debug_level;
  19. #define mfc_debug(level, fmt, args...) \
  20. do { \
  21. if (mfc_debug_level >= level) \
  22. printk(KERN_DEBUG "%s:%d: " fmt, \
  23. __func__, __LINE__, ##args); \
  24. } while (0)
  25. #else
  26. #define mfc_debug(level, fmt, args...)
  27. #endif
  28. #define mfc_debug_enter() mfc_debug(5, "enter\n")
  29. #define mfc_debug_leave() mfc_debug(5, "leave\n")
  30. #define mfc_err(fmt, args...) \
  31. do { \
  32. printk(KERN_ERR "%s:%d: " fmt, \
  33. __func__, __LINE__, ##args); \
  34. } while (0)
  35. #define mfc_info(fmt, args...) \
  36. do { \
  37. printk(KERN_INFO "%s:%d: " fmt, \
  38. __func__, __LINE__, ##args); \
  39. } while (0)
  40. #endif /* S5P_MFC_DEBUG_H_ */