diff options
Diffstat (limited to 'include/media/saa7146.h')
-rw-r--r-- | include/media/saa7146.h | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/include/media/saa7146.h b/include/media/saa7146.h index 6e84cde44b82..0f037e8edf9a 100644 --- a/include/media/saa7146.h +++ b/include/media/saa7146.h | |||
@@ -24,24 +24,32 @@ | |||
24 | 24 | ||
25 | extern unsigned int saa7146_debug; | 25 | extern unsigned int saa7146_debug; |
26 | 26 | ||
27 | //#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),KBUILD_MODNAME,__func__) | ||
28 | |||
29 | #ifndef DEBUG_VARIABLE | 27 | #ifndef DEBUG_VARIABLE |
30 | #define DEBUG_VARIABLE saa7146_debug | 28 | #define DEBUG_VARIABLE saa7146_debug |
31 | #endif | 29 | #endif |
32 | 30 | ||
33 | #define DEBUG_PROLOG printk("%s: %s(): ",KBUILD_MODNAME, __func__) | 31 | #define ERR(fmt, ...) pr_err("%s: " fmt, __func__, ##__VA_ARGS__) |
34 | #define INFO(x) { printk("%s: ",KBUILD_MODNAME); printk x; } | 32 | |
35 | 33 | #define _DBG(mask, fmt, ...) \ | |
36 | #define ERR(x) { DEBUG_PROLOG; printk x; } | 34 | do { \ |
37 | 35 | if (DEBUG_VARIABLE & mask) \ | |
38 | #define DEB_S(x) if (0!=(DEBUG_VARIABLE&0x01)) { DEBUG_PROLOG; printk x; } /* simple debug messages */ | 36 | pr_debug("%s(): " fmt, __func__, ##__VA_ARGS__); \ |
39 | #define DEB_D(x) if (0!=(DEBUG_VARIABLE&0x02)) { DEBUG_PROLOG; printk x; } /* more detailed debug messages */ | 37 | } while (0) |
40 | #define DEB_EE(x) if (0!=(DEBUG_VARIABLE&0x04)) { DEBUG_PROLOG; printk x; } /* print enter and exit of functions */ | 38 | |
41 | #define DEB_I2C(x) if (0!=(DEBUG_VARIABLE&0x08)) { DEBUG_PROLOG; printk x; } /* i2c debug messages */ | 39 | /* simple debug messages */ |
42 | #define DEB_VBI(x) if (0!=(DEBUG_VARIABLE&0x10)) { DEBUG_PROLOG; printk x; } /* vbi debug messages */ | 40 | #define DEB_S(fmt, ...) _DBG(0x01, fmt, ##__VA_ARGS__) |
43 | #define DEB_INT(x) if (0!=(DEBUG_VARIABLE&0x20)) { DEBUG_PROLOG; printk x; } /* interrupt debug messages */ | 41 | /* more detailed debug messages */ |
44 | #define DEB_CAP(x) if (0!=(DEBUG_VARIABLE&0x40)) { DEBUG_PROLOG; printk x; } /* capture debug messages */ | 42 | #define DEB_D(fmt, ...) _DBG(0x02, fmt, ##__VA_ARGS__) |
43 | /* print enter and exit of functions */ | ||
44 | #define DEB_EE(fmt, ...) _DBG(0x04, fmt, ##__VA_ARGS__) | ||
45 | /* i2c debug messages */ | ||
46 | #define DEB_I2C(fmt, ...) _DBG(0x08, fmt, ##__VA_ARGS__) | ||
47 | /* vbi debug messages */ | ||
48 | #define DEB_VBI(fmt, ...) _DBG(0x10, fmt, ##__VA_ARGS__) | ||
49 | /* interrupt debug messages */ | ||
50 | #define DEB_INT(fmt, ...) _DBG(0x20, fmt, ##__VA_ARGS__) | ||
51 | /* capture debug messages */ | ||
52 | #define DEB_CAP(fmt, ...) _DBG(0x40, fmt, ##__VA_ARGS__) | ||
45 | 53 | ||
46 | #define SAA7146_ISR_CLEAR(x,y) \ | 54 | #define SAA7146_ISR_CLEAR(x,y) \ |
47 | saa7146_write(x, ISR, (y)); | 55 | saa7146_write(x, ISR, (y)); |