From: Sylwester Nawrocki Date: Wed, 23 Feb 2011 11:17:57 +0000 (-0300) Subject: [media] s5p-fimc: Use dynamic debug X-Git-Tag: firefly_0821_release~7613^2~1709^2~126 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1e00469599b5841f5b02c436b9958073a0ad576c;p=firefly-linux-kernel-4.4.55.git [media] s5p-fimc: Use dynamic debug Use pr_debug instead of printk so it is possible to control debug traces at runtime. E.g. to enable debug trace in file fimc-core.c use command: echo -n 'file fimc-core.c +p' > /sys/kernel/debug/dynamic_debug/control or echo -n 'file fimc-core.c -p' > /sys/kernel/debug/dynamic_debug/control to disable. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/video/s5p-fimc/fimc-core.h index 41b135249d1f..3beb1e5320ce 100644 --- a/drivers/media/video/s5p-fimc/fimc-core.h +++ b/drivers/media/video/s5p-fimc/fimc-core.h @@ -29,12 +29,8 @@ #define err(fmt, args...) \ printk(KERN_ERR "%s:%d: " fmt "\n", __func__, __LINE__, ##args) -#ifdef DEBUG #define dbg(fmt, args...) \ - printk(KERN_DEBUG "%s:%d: " fmt "\n", __func__, __LINE__, ##args) -#else -#define dbg(fmt, args...) -#endif + pr_debug("%s:%d: " fmt "\n", __func__, __LINE__, ##args) /* Time to wait for next frame VSYNC interrupt while stopping operation. */ #define FIMC_SHUTDOWN_TIMEOUT ((100*HZ)/1000)