2011-06-21 10:51:26 -03:00
/*
2014-08-22 06:07:57 -05:00
* drivers / media / platform / s5p - mfc / s5p_mfc_debug . h
2011-06-21 10:51:26 -03:00
*
* Header file for Samsung MFC ( Multi Function Codec - FIMV ) driver
* This file contains debug macros
*
* Kamil Debski , Copyright ( c ) 2011 Samsung Electronics
* http : //www.samsung.com/
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation .
*/
# ifndef S5P_MFC_DEBUG_H_
# define S5P_MFC_DEBUG_H_
# define DEBUG
# ifdef DEBUG
2014-08-22 06:07:57 -05:00
extern int mfc_debug_level ;
2011-06-21 10:51:26 -03:00
# define mfc_debug(level, fmt, args...) \
do { \
2014-08-22 06:07:57 -05:00
if ( mfc_debug_level > = level ) \
2011-06-21 10:51:26 -03:00
printk ( KERN_DEBUG " %s:%d: " fmt , \
__func__ , __LINE__ , # # args ) ; \
} while ( 0 )
# else
# define mfc_debug(level, fmt, args...)
# endif
2013-05-28 03:26:16 -03:00
# define mfc_debug_enter() mfc_debug(5, "enter\n")
# define mfc_debug_leave() mfc_debug(5, "leave\n")
2011-06-21 10:51:26 -03:00
# define mfc_err(fmt, args...) \
do { \
printk ( KERN_ERR " %s:%d: " fmt , \
__func__ , __LINE__ , # # args ) ; \
} while ( 0 )
2016-11-16 07:04:51 -02:00
# define mfc_err_limited(fmt, args...) \
do { \
printk_ratelimited ( KERN_ERR " %s:%d: " fmt , \
__func__ , __LINE__ , # # args ) ; \
} while ( 0 )
2011-06-21 10:51:26 -03:00
# define mfc_info(fmt, args...) \
do { \
printk ( KERN_INFO " %s:%d: " fmt , \
__func__ , __LINE__ , # # args ) ; \
} while ( 0 )
# endif /* S5P_MFC_DEBUG_H_ */