diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-19 16:59:08 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-19 16:59:08 -0400 |
commit | 1e6dea12fc00f3da24a0ff566c0a7cfbe62998e4 (patch) | |
tree | 11b3bfa1f4bcc62ceaeaf539a4a41599533432d2 /linux/drivers/media/dvb/siano/smscoreapi.h | |
parent | bcf9ebb39574d120560c3d9149a618e0e5b282d9 (diff) | |
download | mediapointer-dvb-s2-1e6dea12fc00f3da24a0ff566c0a7cfbe62998e4.tar.gz mediapointer-dvb-s2-1e6dea12fc00f3da24a0ff566c0a7cfbe62998e4.tar.bz2 |
sms1xxx: add debug module option, to enable debug messages
From: Michael Krufky <mkrufky@linuxtv.org>
All dmesg spam turned off by default, for now. Values for debug:
(info=1, adv=2 (or-able)
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/siano/smscoreapi.h')
-rw-r--r-- | linux/drivers/media/dvb/siano/smscoreapi.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/siano/smscoreapi.h b/linux/drivers/media/dvb/siano/smscoreapi.h index b9d216ebf..65f492834 100644 --- a/linux/drivers/media/dvb/siano/smscoreapi.h +++ b/linux/drivers/media/dvb/siano/smscoreapi.h @@ -579,12 +579,26 @@ void smsdvb_unregister(void); int smsusb_register(void); void smsusb_unregister(void); +/* ------------------------------------------------------------------------ */ + +extern int sms_debug; + +#define DBG_INFO 1 +#define DBG_ADV 2 + +#define sms_printk(kern, fmt, arg...) \ + printk(kern "%s: " fmt "\n", __func__, ##arg) + +#define dprintk(kern, lvl, fmt, arg...) do {\ + if (sms_debug & lvl) \ + sms_printk(kern, fmt, ##arg); } while (0) + #define sms_err(fmt, arg...) \ - printk(KERN_ERR "%s " fmt "\n", __func__, ##arg) + sms_printk(KERN_ERR, "%s " fmt "\n", __func__, ##arg) #define sms_info(fmt, arg...) \ - printk(KERN_INFO "%s " fmt "\n", __func__, ##arg) + dprintk(KERN_INFO, DBG_INFO, fmt, ##arg) #define sms_debug(fmt, arg...) \ - printk(KERN_DEBUG "%s " fmt "\n", __func__, ##arg) + dprintk(KERN_DEBUG, DBG_ADV, fmt, ##arg) #endif /* __smscoreapi_h__ */ |