S3C2410 I2C driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 14, 2004 at 10:54:39AM +0100, Ben Dooks wrote:
> > > +/* Debug */
> > > +
> > > +#define DBG(lev, msg...) do {\
> > > +	if (lev < debug_info) \
> > > +		dev_info(i2c->dev, msg); \
> > > +	if (lev < debug_norm ) \
> > > +		dev_dbg(i2c->dev, msg); \
> > > +	} while(0)
> > 
> > And if they go away, this odd DBG() macro can also go away, right?
> 
> would `#define DBG(lev, msg..) do {} while(0)` be good enough, so
> that the debugging info is left if it needed to be resurrected later?

Just do what the other i2c drivers do.  Have dev_dbg() be enabled if the
proper CONFIG option is set.  Otherwise dev_dbg() goes away to nothing.

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux