diff --git a/3.16/LKMPG-3.16.html b/3.16/LKMPG-3.16.html index 10862f6..de17eec 100644 --- a/3.16/LKMPG-3.16.html +++ b/3.16/LKMPG-3.16.html @@ -1017,9 +1017,9 @@ Arrays are supported too, but things are a bit different now than they were in t
int myintarray[2]; module_param_array(myintarray, int, NULL, 0); /* not interested in count */ -int myshortarray[4]; +short myshortarray[4]; int count; -module_parm_array(myshortarray, short, , 0); /* put count into "count" variable */ +module_param_array(myshortarray, short, &count, 0); /* put count into "count" variable */diff --git a/3.16/LKMPG-3.16.org b/3.16/LKMPG-3.16.org index 04d79fa..99e6480 100644 --- a/3.16/LKMPG-3.16.org +++ b/3.16/LKMPG-3.16.org @@ -407,9 +407,9 @@ Arrays are supported too, but things are a bit different now than they were in t int myintarray[2]; module_param_array(myintarray, int, NULL, 0); /* not interested in count */ -int myshortarray[4]; +short myshortarray[4]; int count; -module_parm_array(myshortarray, short, , 0); /* put count into "count" variable */ +module_param_array(myshortarray, short, &count, 0); /* put count into "count" variable */ #+END_SRC A good use for this is to have the module variable's default values set, like an port or IO address. If the variables contain the default values, then perform autodetection (explained elsewhere). Otherwise, keep the current value. This will be made clear later on. diff --git a/3.8/LKMPG-3.8.html b/3.8/LKMPG-3.8.html index 3ed3a0a..b7b84dc 100644 --- a/3.8/LKMPG-3.8.html +++ b/3.8/LKMPG-3.8.html @@ -1191,9 +1191,9 @@ module_param_array(myintarray, int, NULL, 0); * not interested in count *
-int myshortarray[4]; +short myshortarray[4]; int count; -module_parm_array(myshortarray, short, , 0); * put count into "count" variable * +module_param_array(myshortarray, short, &count, 0); * put count into "count" variable * #+END_SRC
diff --git a/3.8/LKMPG-3.8.org b/3.8/LKMPG-3.8.org index 759544e..2d55543 100644 --- a/3.8/LKMPG-3.8.org +++ b/3.8/LKMPG-3.8.org @@ -451,9 +451,9 @@ Arrays are supported too, but things are a bit different now than they were in t int myintarray[2]; module_param_array(myintarray, int, NULL, 0); /* not interested in count */ -int myshortarray[4]; +short myshortarray[4]; int count; -module_parm_array(myshortarray, short, , 0); /* put count into "count" variable */ +module_param_array(myshortarray, short, &count, 0); /* put count into "count" variable */ #+END_SRC A good use for this is to have the module variable's default values set, like an port or IO address. If the variables contain the default values, then perform autodetection (explained elsewhere). Otherwise, keep the current value. This will be made clear later on. diff --git a/4.7.4/LKMPG-4.7.4.html b/4.7.4/LKMPG-4.7.4.html index b343432..520efee 100644 --- a/4.7.4/LKMPG-4.7.4.html +++ b/4.7.4/LKMPG-4.7.4.html @@ -920,9 +920,9 @@ Arrays are supported too, but things are a bit different now than they were in tint myintarray[2]; module_param_array(myintarray, int, NULL, 0); /* not interested in count */ -int myshortarray[4]; +short myshortarray[4]; int count; -module_parm_array(myshortarray, short, , 0); /* put count into "count" variable */ +module_param_array(myshortarray, short, &count, 0); /* put count into "count" variable */diff --git a/4.7.4/LKMPG-4.7.4.org b/4.7.4/LKMPG-4.7.4.org index c1c1f0e..7558e1e 100644 --- a/4.7.4/LKMPG-4.7.4.org +++ b/4.7.4/LKMPG-4.7.4.org @@ -369,9 +369,9 @@ Arrays are supported too, but things are a bit different now than they were in t int myintarray[2]; module_param_array(myintarray, int, NULL, 0); /* not interested in count */ -int myshortarray[4]; +short myshortarray[4]; int count; -module_parm_array(myshortarray, short, , 0); /* put count into "count" variable */ +module_parm_array(myshortarray, short, &count, 0); /* put count into "count" variable */ #+END_SRC A good use for this is to have the module variable's default values set, like an port or IO address. If the variables contain the default values, then perform autodetection (explained elsewhere). Otherwise, keep the current value. This will be made clear later on.