diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-07-24 22:06:04 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-07-24 22:06:04 +0930 |
commit | 4befb026cf74b52fc7d382142bbfc0e9b6aab5e7 (patch) | |
tree | 48c4954f8eb9ab43f449750c3f4b0685fd323c03 /include | |
parent | 66574cc05438dd0907029075d7e6ec5ac0036fbc (diff) | |
download | lwn-4befb026cf74b52fc7d382142bbfc0e9b6aab5e7.tar.gz lwn-4befb026cf74b52fc7d382142bbfc0e9b6aab5e7.zip |
module: change attr callbacks to take struct module_kobject
This simplifies the next patch, where we have an attribute on a
builtin module (ie. module == NULL).
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (split into 2)
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/module.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index d9ca2d5dc6d0..b87e7625a98c 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -48,10 +48,18 @@ struct modversion_info struct module; +struct module_kobject { + struct kobject kobj; + struct module *mod; + struct kobject *drivers_dir; + struct module_param_attrs *mp; +}; + struct module_attribute { - struct attribute attr; - ssize_t (*show)(struct module_attribute *, struct module *, char *); - ssize_t (*store)(struct module_attribute *, struct module *, + struct attribute attr; + ssize_t (*show)(struct module_attribute *, struct module_kobject *, + char *); + ssize_t (*store)(struct module_attribute *, struct module_kobject *, const char *, size_t count); void (*setup)(struct module *, const char *); int (*test)(struct module *); @@ -65,15 +73,8 @@ struct module_version_attribute { } __attribute__ ((__aligned__(sizeof(void *)))); extern ssize_t __modver_version_show(struct module_attribute *, - struct module *, char *); + struct module_kobject *, char *); -struct module_kobject -{ - struct kobject kobj; - struct module *mod; - struct kobject *drivers_dir; - struct module_param_attrs *mp; -}; /* These are either module local, or the kernel's dummy ones. */ extern int init_module(void); |