Re: [PATCH] zr36067: Debugging cleanups

Trent Piepho <[email protected]>
Newsgroups gmane.comp.video.mjpeg.devel
Message-ID <[email protected]>
On Mon, 7 May 2007, Jean Delvare wrote:
> > > +int debug = 1;
> >
> > This is not good, imagine another driver or kernel particle using a
> > (global) variable called debug. Last time I did this, there were 3 of
> > them. :-). Please call it something else.
>
> I guess it really only matters when the conflicting drivers are all
> built-in (as opposed to modular) and I would hope nobody does this,
> but... You're totally right.

int zr36067_debug = 0;
module_param_named(debug, zr36067_debug, int, 0644);
MODULE_PARM_DESC(debug, "Debug level (0-4)");

#define dprintk(...) if( zr36067_debug ....)

Anything wrong with that?  BTW, zoran makes more than one device with Linux
drivers (also zr36120 and zr364xx), so I don't think the "zr" prefix alone
is a good choice for a global variable.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.