aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zoran_procfs.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-07-17 17:29:41 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:02:57 -0400
commit18b548ca580838a2cc5813a941e6dab28660bb22 (patch)
tree58b2a76ff9108c4e458543d1965e02457843757c /drivers/media/video/zoran_procfs.c
parent63116febb9233743279a05be510ab8524f5f6242 (diff)
V4L/DVB (5884): zr36067: clean up debug function
Debugging cleanups to the zr36067 driver: * Use module_param_named() to declare the debug parameter, so we can use a single global variable to handle the debug level. This makes the driver a bit smaller (by 648 bytes on x86_64), thanks to one less level of indirection on every use. * Change the debug parameter sysfs permissions, so that the debug level can be adjusted at runtime, as is done in many other media/video drivers. * The debug level is between 0 and 5, not 0 and 4. * Move the zr_debug export and dprintk macro definition to a header file so that we don't have to define them in each source file. * Simplify a duplicate test on zr_debug. Note that zr_debug was subsequently renamed to debug_zr36067 to avoid possible conflicts with other Zoran device drivers, on a suggestion by Trent Piepho. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/zoran_procfs.c')
-rw-r--r--drivers/media/video/zoran_procfs.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/media/video/zoran_procfs.c b/drivers/media/video/zoran_procfs.c
index 446ae8d5c3df..328ed6e7ac6a 100644
--- a/drivers/media/video/zoran_procfs.c
+++ b/drivers/media/video/zoran_procfs.c
@@ -48,14 +48,7 @@
48#include "videocodec.h" 48#include "videocodec.h"
49#include "zoran.h" 49#include "zoran.h"
50#include "zoran_procfs.h" 50#include "zoran_procfs.h"
51 51#include "zoran_card.h"
52extern int *zr_debug;
53
54#define dprintk(num, format, args...) \
55 do { \
56 if (*zr_debug >= num) \
57 printk(format, ##args); \
58 } while (0)
59 52
60#ifdef CONFIG_PROC_FS 53#ifdef CONFIG_PROC_FS
61struct procfs_params_zr36067 { 54struct procfs_params_zr36067 {