summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/ksysfs.c18
-rw-r--r--kernel/user.c2
2 files changed, 10 insertions, 10 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index 45e646585605..1081aff5fb9e 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -101,8 +101,8 @@ static struct bin_attribute notes_attr = {
.read = &notes_read,
};
-struct kset *kernel_kset;
-EXPORT_SYMBOL_GPL(kernel_kset);
+struct kobject *kernel_kobj;
+EXPORT_SYMBOL_GPL(kernel_kobj);
static struct attribute * kernel_attrs[] = {
#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET)
@@ -125,18 +125,18 @@ static int __init ksysfs_init(void)
{
int error;
- kernel_kset = kset_create_and_add("kernel", NULL, NULL);
- if (!kernel_kset) {
+ kernel_kobj = kobject_create_and_add("kernel", NULL);
+ if (!kernel_kobj) {
error = -ENOMEM;
goto exit;
}
- error = sysfs_create_group(&kernel_kset->kobj, &kernel_attr_group);
+ error = sysfs_create_group(kernel_kobj, &kernel_attr_group);
if (error)
goto kset_exit;
if (notes_size > 0) {
notes_attr.size = notes_size;
- error = sysfs_create_bin_file(&kernel_kset->kobj, &notes_attr);
+ error = sysfs_create_bin_file(kernel_kobj, &notes_attr);
if (error)
goto group_exit;
}
@@ -150,11 +150,11 @@ static int __init ksysfs_init(void)
notes_exit:
if (notes_size > 0)
- sysfs_remove_bin_file(&kernel_kset->kobj, &notes_attr);
+ sysfs_remove_bin_file(kernel_kobj, &notes_attr);
group_exit:
- sysfs_remove_group(&kernel_kset->kobj, &kernel_attr_group);
+ sysfs_remove_group(kernel_kobj, &kernel_attr_group);
kset_exit:
- kset_unregister(kernel_kset);
+ kobject_unregister(kernel_kobj);
exit:
return error;
}
diff --git a/kernel/user.c b/kernel/user.c
index 5a106f3fdf05..7f17e6e8fd65 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -201,7 +201,7 @@ done:
*/
int __init uids_sysfs_init(void)
{
- uids_kset = kset_create_and_add("uids", NULL, &kernel_kset->kobj);
+ uids_kset = kset_create_and_add("uids", NULL, kernel_kobj);
if (!uids_kset)
return -ENOMEM;