aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/moduleparam.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-08-12 01:04:17 -0400
committerRusty Russell <rusty@rustcorp.com.au>2010-08-11 09:34:18 -0400
commite6df34a4429b77fdffb6e05adf263468a3dcda33 (patch)
tree0858a2cd08fffad89c05ab4a0d14ae832777f42b /include/linux/moduleparam.h
parent6a841528d288ac420052f5c98fd426b0fcdc5b52 (diff)
param: add a free hook to kernel_param_ops.
This allows us to generalize the KPARAM_KMALLOCED flag, by calling a function on every parameter when a module is unloaded. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Diffstat (limited to 'include/linux/moduleparam.h')
-rw-r--r--include/linux/moduleparam.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 02e5090ce32f..9f51568f51c8 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -36,6 +36,8 @@ struct kernel_param_ops {
36 int (*set)(const char *val, const struct kernel_param *kp); 36 int (*set)(const char *val, const struct kernel_param *kp);
37 /* Returns length written or -errno. Buffer is 4k (ie. be short!) */ 37 /* Returns length written or -errno. Buffer is 4k (ie. be short!) */
38 int (*get)(char *buffer, const struct kernel_param *kp); 38 int (*get)(char *buffer, const struct kernel_param *kp);
39 /* Optional function to free kp->arg when module unloaded. */
40 void (*free)(void *arg);
39}; 41};
40 42
41/* Flag bits for kernel_param.flags */ 43/* Flag bits for kernel_param.flags */