1. Programming in user mode: Pass command-line arguments via main ()
Writing a kernel module: passing command-line arguments via Module_param ()
2. The Module_param macro is new in the Linux 2.6 kernel and is defined in the Include/linux/moduleparam.h file
3. Module_param uses 3 parameters: variable name, its type, and a permission mask to make an auxiliary SYSFS entry
Module_param (name, type, perm);
Name is both the parameter name that the user sees and the variable that accepts the parameter within the module;
Type represents the data type of the parameter, which is one of the following: Byte, short, ushort, int, uint, long, ulong, CHARP, BOOL, invbool;
PERM Specifies the access rights for the corresponding file in the SYSFS. Access permissions are managed in the same way as Linux files love your access rights, such as 0644, or using macros in stat.h such as S_irugo.
4. Before using a macro, you must declare a variable, typically with the following usage:
static unsigned int int_var = 0;
Module_param (Int_var, uint, s_irugo);
5. Declare an array parameter, using Module_param_array (name,type,num,perm);
Name is the array name (also the parameter name).
Type is an array of element types,
num is an integer variable,
Perm is the usual permission value.
6. Example: sudo insmdo module_param.ko who=tiger times=4
Refer:http://www.linuxidc.com/linux/2011-02/32131.htm
Linux Module_param ()-Pass parameters to the module