aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-07-24 08:36:04 -0400
committerRusty Russell <rusty@rustcorp.com.au>2011-07-24 08:36:04 -0400
commit4befb026cf74b52fc7d382142bbfc0e9b6aab5e7 (patch)
tree48c4954f8eb9ab43f449750c3f4b0685fd323c03 /include
parent66574cc05438dd0907029075d7e6ec5ac0036fbc (diff)
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.h23
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
48 48
49struct module; 49struct module;
50 50
51struct module_kobject {
52 struct kobject kobj;
53 struct module *mod;
54 struct kobject *drivers_dir;
55 struct module_param_attrs *mp;
56};
57
51struct module_attribute { 58struct module_attribute {
52 struct attribute attr; 59 struct attribute attr;
53 ssize_t (*show)(struct module_attribute *, struct module *, char *); 60 ssize_t (*show)(struct module_attribute *, struct module_kobject *,
54 ssize_t (*store)(struct module_attribute *, struct module *, 61 char *);
62 ssize_t (*store)(struct module_attribute *, struct module_kobject *,
55 const char *, size_t count); 63 const char *, size_t count);
56 void (*setup)(struct module *, const char *); 64 void (*setup)(struct module *, const char *);
57 int (*test)(struct module *); 65 int (*test)(struct module *);
@@ -65,15 +73,8 @@ struct module_version_attribute {
65} __attribute__ ((__aligned__(sizeof(void *)))); 73} __attribute__ ((__aligned__(sizeof(void *))));
66 74
67extern ssize_t __modver_version_show(struct module_attribute *, 75extern ssize_t __modver_version_show(struct module_attribute *,
68 struct module *, char *); 76 struct module_kobject *, char *);
69 77
70struct module_kobject
71{
72 struct kobject kobj;
73 struct module *mod;
74 struct kobject *drivers_dir;
75 struct module_param_attrs *mp;
76};
77 78
78/* These are either module local, or the kernel's dummy ones. */ 79/* These are either module local, or the kernel's dummy ones. */
79extern int init_module(void); 80extern int init_module(void);