aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/moduleparam.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-08-11 23:04:17 -0600
committerRusty Russell <rusty@rustcorp.com.au>2010-08-11 23:04:18 +0930
commite6df34a4429b77fdffb6e05adf263468a3dcda33 (patch)
tree0858a2cd08fffad89c05ab4a0d14ae832777f42b /include/linux/moduleparam.h
parent6a841528d288ac420052f5c98fd426b0fcdc5b52 (diff)
downloadkernel_samsung_aries-e6df34a4429b77fdffb6e05adf263468a3dcda33.zip
kernel_samsung_aries-e6df34a4429b77fdffb6e05adf263468a3dcda33.tar.gz
kernel_samsung_aries-e6df34a4429b77fdffb6e05adf263468a3dcda33.tar.bz2
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 02e5090..9f51568 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -36,6 +36,8 @@ struct kernel_param_ops {
int (*set)(const char *val, const struct kernel_param *kp);
/* Returns length written or -errno. Buffer is 4k (ie. be short!) */
int (*get)(char *buffer, const struct kernel_param *kp);
+ /* Optional function to free kp->arg when module unloaded. */
+ void (*free)(void *arg);
};
/* Flag bits for kernel_param.flags */