diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-07-24 08:36:04 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-07-24 08:36:04 -0400 |
commit | 4befb026cf74b52fc7d382142bbfc0e9b6aab5e7 (patch) | |
tree | 48c4954f8eb9ab43f449750c3f4b0685fd323c03 /kernel/params.c | |
parent | 66574cc05438dd0907029075d7e6ec5ac0036fbc (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 'kernel/params.c')
-rw-r--r-- | kernel/params.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/params.c b/kernel/params.c index 2a4ba258f04f..37e9b20a718b 100644 --- a/kernel/params.c +++ b/kernel/params.c | |||
@@ -511,7 +511,7 @@ struct module_param_attrs | |||
511 | #define to_param_attr(n) container_of(n, struct param_attribute, mattr) | 511 | #define to_param_attr(n) container_of(n, struct param_attribute, mattr) |
512 | 512 | ||
513 | static ssize_t param_attr_show(struct module_attribute *mattr, | 513 | static ssize_t param_attr_show(struct module_attribute *mattr, |
514 | struct module *mod, char *buf) | 514 | struct module_kobject *mk, char *buf) |
515 | { | 515 | { |
516 | int count; | 516 | int count; |
517 | struct param_attribute *attribute = to_param_attr(mattr); | 517 | struct param_attribute *attribute = to_param_attr(mattr); |
@@ -531,7 +531,7 @@ static ssize_t param_attr_show(struct module_attribute *mattr, | |||
531 | 531 | ||
532 | /* sysfs always hands a nul-terminated string in buf. We rely on that. */ | 532 | /* sysfs always hands a nul-terminated string in buf. We rely on that. */ |
533 | static ssize_t param_attr_store(struct module_attribute *mattr, | 533 | static ssize_t param_attr_store(struct module_attribute *mattr, |
534 | struct module *owner, | 534 | struct module_kobject *km, |
535 | const char *buf, size_t len) | 535 | const char *buf, size_t len) |
536 | { | 536 | { |
537 | int err; | 537 | int err; |
@@ -807,7 +807,7 @@ static void __init param_sysfs_builtin(void) | |||
807 | } | 807 | } |
808 | 808 | ||
809 | ssize_t __modver_version_show(struct module_attribute *mattr, | 809 | ssize_t __modver_version_show(struct module_attribute *mattr, |
810 | struct module *mod, char *buf) | 810 | struct module_kobject *mk, char *buf) |
811 | { | 811 | { |
812 | struct module_version_attribute *vattr = | 812 | struct module_version_attribute *vattr = |
813 | container_of(mattr, struct module_version_attribute, mattr); | 813 | container_of(mattr, struct module_version_attribute, mattr); |
@@ -852,7 +852,7 @@ static ssize_t module_attr_show(struct kobject *kobj, | |||
852 | if (!attribute->show) | 852 | if (!attribute->show) |
853 | return -EIO; | 853 | return -EIO; |
854 | 854 | ||
855 | ret = attribute->show(attribute, mk->mod, buf); | 855 | ret = attribute->show(attribute, mk, buf); |
856 | 856 | ||
857 | return ret; | 857 | return ret; |
858 | } | 858 | } |
@@ -871,7 +871,7 @@ static ssize_t module_attr_store(struct kobject *kobj, | |||
871 | if (!attribute->store) | 871 | if (!attribute->store) |
872 | return -EIO; | 872 | return -EIO; |
873 | 873 | ||
874 | ret = attribute->store(attribute, mk->mod, buf, len); | 874 | ret = attribute->store(attribute, mk, buf, len); |
875 | 875 | ||
876 | return ret; | 876 | return ret; |
877 | } | 877 | } |