Driver porting: more module changes
Driver porting: more module changes
Posted Feb 21, 2003 10:17 UTC (Fri) by rrw (guest, #9757)Parent article: Driver porting: more module changes
I think that there is one problem with this scheme of parameters. In case of numbers you cannot distinguish if the user didn't set the parameter or if he has set it to zero. Perheaps example will explain it better:
module_param(howmany, int, 0);
if you load this module with howmany=0, howmany will be zero. But if you omit howmany on modload commandline, howmany will be also zero.
One should pass the numeric arguments to the code as (int *), not the (int). Then NULL will be ``not set''.