Thread (30 messages) 30 messages, 5 authors, 2008-07-16

Re: [PATCH 1/2] 8139too: Make PIO/MMIO a modparam

From: Peter Korsgaard <jacmet@sunsite.dk>
Date: 2008-07-16 10:03:47

quoted
quoted
quoted
quoted
"Jeff" == Jeff Garzik [off-list ref] writes:
 >> > * [optional] if code not too ugly, change mod param description
 >> based on  > CONFIG_8139TOO_PIO to indicate the currently compiled
 >> default
 >> 
 >> Not sure of a non-icky way to do this other than ifdefs.
 >> The best I could come up with is.
 >> 
 >> #ifdef CONFIG_8139TOO_PIO
 >> MODULE_PARM_DESC(use_io, "PIO/MMIO switch.  0=MMIO 1=PIO
 >> default=PIO"); #else
 >> MODULE_PARM_DESC(use_io, "PIO/MMIO switch.  0=MMIO 1=PIO
 >> default=MMIO"); #endif
 >> 
 >> palatable?

 Jeff> best you can do AFAIK, so yes

Something like:
#ifdef CONFIG_8139TOO_PIO
#define DEFAULTMODE "PIO"
#else
#define DEFAULTMODE "MMIO"
#endif

MODULE_PARM_DESC(use_io, "PIO/MMIO switch.  0=MMIO 1=PIO default=" DEFAULTMODE);

would be nicer.

-- 
Bye, Peter Korsgaard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help