Usually the DPRINTK macro is just a printk usually with KERN_DEBUG or
KERN_ERR, and will be invoked only when DEBUG is defined. This is used
instead of directly calling printk to easily turn ON or OFF the
debugging messages in your driver.

example:

#ifdef DEBUG
#define DPRINTK(format,args...) printk(KERN_DEBUG
format,##args)
#else
#define
DPRINTK(format,args...)
#endif

On Sep 27, 10:10 am, Peter Teoh <htmldevelo...@gmail.com> wrote:
> in drivers/atm/idt77252.h:
>
> is the MACRO:
>
> #define DPRINTK(args...)   do { if (debug & DBG_GENERAL)
> printk(args); } while(0)
>
> which means JUST printk() when DEBUG is turned on.
>
> On Sep 25, 7:56 pm, sai <sp.pongp...@gmail.com> wrote:
>
> > I am the student of android devices driver! I always see the
> > word"DPRINTK" in the drivers code.I do not the meaning of it.   Also
> > how different between DPRINTK with printk?   can someone tell me?Thank
> > you very much!

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to