upload tizen1.0 source
[kernel/linux-2.6.36.git] / drivers / media / video / samsung / mfc5x / mfc_log.h
1 /*
2  * linux/drivers/media/video/samsung/mfc5x/mfc_log.h
3  *
4  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
5  *              http://www.samsung.com/
6  *
7  * Logging interface for Samsung MFC (Multi Function Codec - FIMV) driver
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 2 as
11  * published by the Free Software Foundation.
12  */
13
14 #ifndef __MFC_LOG_H
15 #define __MFC_LOG_H __FILE__
16
17 /* debug macros */
18 #define MFC_DEBUG(fmt, ...)                                     \
19         do {                                                    \
20                 printk(KERN_DEBUG                               \
21                         "%s-> " fmt, __func__, ##__VA_ARGS__);  \
22         } while(0)
23
24 #define MFC_ERROR(fmt, ...)                                     \
25         do {                                                    \
26                 printk(KERN_ERR                                 \
27                         "%s-> " fmt, __func__, ##__VA_ARGS__);  \
28         } while (0)
29
30 #define MFC_NOTICE(fmt, ...)                                    \
31         do {                                                    \
32                 printk(KERN_NOTICE                              \
33                         fmt, ##__VA_ARGS__);                    \
34         } while (0)
35
36 #define MFC_INFO(fmt, ...)                                      \
37         do {                                                    \
38                 printk(KERN_INFO                                \
39                         fmt, ##__VA_ARGS__);                    \
40         } while (0)
41
42 #define MFC_WARN(fmt, ...)                                      \
43         do {                                                    \
44                 printk(KERN_WARNING                             \
45                         fmt, ##__VA_ARGS__);                    \
46         } while (0)
47
48 #ifdef CONFIG_VIDEO_MFC5X_DEBUG
49 #define mfc_dbg(fmt, ...)               MFC_DEBUG(fmt, ##__VA_ARGS__)
50 #else
51 #define mfc_dbg(fmt, ...)
52 #endif
53
54 #define mfc_err(fmt, ...)               MFC_ERROR(fmt, ##__VA_ARGS__)
55 #define mfc_notice(fmt, ...)            MFC_NOTICE(fmt, ##__VA_ARGS__)
56 #define mfc_info(fmt, ...)              MFC_INFO(fmt, ##__VA_ARGS__)
57 #define mfc_warn(fmt, ...)              MFC_WARN(fmt, ##__VA_ARGS__)
58
59 #endif /* __MFC_LOG_H */