Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344057
b: refs/heads/master
c: 605e70c
h: refs/heads/master
i:
  344055: fcab277
v: v3
  • Loading branch information
Lee, Chun-Yi authored and Matt Fleming committed Oct 30, 2012
1 parent 82e5ab9 commit ed912fe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c542edde3cecc99b180a440ae33dcb7f28642ce
refs/heads/master: 605e70c7aa1b7b0d554baf945630c1d606bbfbc3
9 changes: 9 additions & 0 deletions trunk/drivers/firmware/efivars.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,7 @@ void unregister_efivars(struct efivars *efivars)
sysfs_remove_bin_file(&efivars->kset->kobj, efivars->del_var);
kfree(efivars->new_var);
kfree(efivars->del_var);
kobject_put(efivars->kobject);
kset_unregister(efivars->kset);
}
EXPORT_SYMBOL_GPL(unregister_efivars);
Expand Down Expand Up @@ -1558,6 +1559,14 @@ int register_efivars(struct efivars *efivars,
goto out;
}

efivars->kobject = kobject_create_and_add("efivars", parent_kobj);
if (!efivars->kobject) {
pr_err("efivars: Subsystem registration failed.\n");
error = -ENOMEM;
kset_unregister(efivars->kset);
goto out;
}

/*
* Per EFI spec, the maximum storage allocated for both
* the variable name and variable data is 1024 bytes.
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ struct efivars {
spinlock_t lock;
struct list_head list;
struct kset *kset;
struct kobject *kobject;
struct bin_attribute *new_var, *del_var;
const struct efivar_operations *ops;
struct efivar_entry *walk_entry;
Expand Down

0 comments on commit ed912fe

Please sign in to comment.