summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2004-10-06 00:13:28 +0000
committerJohannes Stezenbach <devnull@localhost>2004-10-06 00:13:28 +0000
commitf9588488a6f3d240f037a3b94ca36e2ad7ff2b3f (patch)
treede9b72cababb6f2618c238418706a4226674e81f /linux/drivers/media
parentf21f1e4dd6ea7dc549d526f0ece77fd7ec4df767 (diff)
downloadmediapointer-dvb-s2-f9588488a6f3d240f037a3b94ca36e2ad7ff2b3f.tar.gz
mediapointer-dvb-s2-f9588488a6f3d240f037a3b94ca36e2ad7ff2b3f.tar.bz2
patch by Luca Bertagnolio: add dvb_net_debug module parameter
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_net.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c
index c97cd5444..3e10e8926 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c
@@ -41,6 +41,13 @@
#include "dvb_demux.h"
#include "dvb_net.h"
+static int dvb_net_debug;
+module_param(dvb_net_debug, int, 0444);
+MODULE_PARM_DESC(dvb_net_debug, "enable debug messages");
+
+#define dprintk(x...) do { if (dvb_net_debug) printk(x); } while (0)
+
+
static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt )
{
unsigned int j;
@@ -50,13 +57,6 @@ static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt )
}
-#if 1
-#define dprintk(x...) printk(x)
-#else
-#define dprintk(x...)
-#endif
-
-
#define DVB_NET_MULTICAST_MAX 10
#define isprint(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'))
@@ -1207,4 +1207,3 @@ int dvb_net_init (struct dvb_adapter *adap, struct dvb_net *dvbnet,
return 0;
}
-