mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes
These are the non-static sysfs attributes that exist on my test machine. Fix them to use sysfs_attr_init or sysfs_bin_attr_init as appropriate. It simply requires making a sysfs attribute present to see this. So this is a little bit tedious but otherwise not too bad. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
6992f53349
commit
a07e4156a2
4 changed files with 9 additions and 0 deletions
|
@ -516,6 +516,7 @@ static __modinit int add_sysfs_param(struct module_kobject *mk,
|
|||
new->grp.attrs = attrs;
|
||||
|
||||
/* Tack new one on the end. */
|
||||
sysfs_attr_init(&new->attrs[num].mattr.attr);
|
||||
new->attrs[num].param = kp;
|
||||
new->attrs[num].mattr.show = param_attr_show;
|
||||
new->attrs[num].mattr.store = param_attr_store;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue