Commit f62ed9e3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

firmware: change firmware_kset to firmware_kobj

There is no firmware "subsystem" it's just a directory in /sys that
other portions of the kernel want to hook into.  So make it a kobject
not a kset to help alivate anyone who tries to do some odd kset-like
things with this.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 15f2f9b3
...@@ -855,7 +855,7 @@ static int __init ipl_init(void) ...@@ -855,7 +855,7 @@ static int __init ipl_init(void)
{ {
int rc; int rc;
ipl_kset = kset_create_and_add("ipl", NULL, &firmware_kset->kobj); ipl_kset = kset_create_and_add("ipl", NULL, firmware_kobj);
if (!ipl_kset) if (!ipl_kset)
return -ENOMEM; return -ENOMEM;
switch (ipl_info.type) { switch (ipl_info.type) {
...@@ -974,7 +974,7 @@ static int __init reipl_init(void) ...@@ -974,7 +974,7 @@ static int __init reipl_init(void)
{ {
int rc; int rc;
reipl_kset = kset_create_and_add("reipl", NULL, &firmware_kset->kobj); reipl_kset = kset_create_and_add("reipl", NULL, firmware_kobj);
if (!reipl_kset) if (!reipl_kset)
return -ENOMEM; return -ENOMEM;
rc = sysfs_create_file(&reipl_kset->kobj, &reipl_type_attr.attr); rc = sysfs_create_file(&reipl_kset->kobj, &reipl_type_attr.attr);
...@@ -1063,7 +1063,7 @@ static int __init dump_init(void) ...@@ -1063,7 +1063,7 @@ static int __init dump_init(void)
{ {
int rc; int rc;
dump_kset = kset_create_and_add("dump", NULL, &firmware_kset->kobj); dump_kset = kset_create_and_add("dump", NULL, firmware_kobj);
if (!dump_kset) if (!dump_kset)
return -ENOMEM; return -ENOMEM;
rc = sysfs_create_file(&dump_kset->kobj, &dump_type_attr); rc = sysfs_create_file(&dump_kset->kobj, &dump_type_attr);
...@@ -1086,7 +1086,7 @@ static int __init shutdown_actions_init(void) ...@@ -1086,7 +1086,7 @@ static int __init shutdown_actions_init(void)
int rc; int rc;
shutdown_actions_kset = kset_create_and_add("shutdown_actions", NULL, shutdown_actions_kset = kset_create_and_add("shutdown_actions", NULL,
&firmware_kset->kobj); firmware_kobj);
if (!shutdown_actions_kset) if (!shutdown_actions_kset)
return -ENOMEM; return -ENOMEM;
rc = sysfs_create_file(&shutdown_actions_kset->kobj, &on_panic_attr); rc = sysfs_create_file(&shutdown_actions_kset->kobj, &on_panic_attr);
......
...@@ -755,7 +755,7 @@ static int __init acpi_init(void) ...@@ -755,7 +755,7 @@ static int __init acpi_init(void)
return -ENODEV; return -ENODEV;
} }
acpi_kobj = kobject_create_and_add("acpi", &firmware_kset->kobj); acpi_kobj = kobject_create_and_add("acpi", firmware_kobj);
if (!acpi_kobj) { if (!acpi_kobj) {
printk(KERN_WARNING "%s: kset create error\n", __FUNCTION__); printk(KERN_WARNING "%s: kset create error\n", __FUNCTION__);
acpi_kobj = NULL; acpi_kobj = NULL;
......
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
#include "base.h" #include "base.h"
struct kset *firmware_kset; struct kobject *firmware_kobj;
EXPORT_SYMBOL_GPL(firmware_kset); EXPORT_SYMBOL_GPL(firmware_kobj);
int __init firmware_init(void) int __init firmware_init(void)
{ {
firmware_kset = kset_create_and_add("firmware", NULL, NULL); firmware_kobj = kobject_create_and_add("firmware", NULL);
if (!firmware_kset) if (!firmware_kobj)
return -ENOMEM; return -ENOMEM;
return 0; return 0;
} }
...@@ -756,7 +756,7 @@ edd_init(void) ...@@ -756,7 +756,7 @@ edd_init(void)
return 1; return 1;
} }
edd_kset = kset_create_and_add("edd", NULL, &firmware_kset->kobj); edd_kset = kset_create_and_add("edd", NULL, firmware_kobj);
if (!edd_kset) if (!edd_kset)
return -ENOMEM; return -ENOMEM;
......
...@@ -668,7 +668,7 @@ efivars_init(void) ...@@ -668,7 +668,7 @@ efivars_init(void)
/* /*
* For now we'll register the efi subsys within this driver * For now we'll register the efi subsys within this driver
*/ */
efi_kset = kset_create_and_add("efi", NULL, &firmware_kset->kobj); efi_kset = kset_create_and_add("efi", NULL, firmware_kobj);
if (!efi_kset) { if (!efi_kset) {
printk(KERN_ERR "efivars: Firmware registration failed.\n"); printk(KERN_ERR "efivars: Firmware registration failed.\n");
error = -ENOMEM; error = -ENOMEM;
......
...@@ -1059,7 +1059,7 @@ pdc_stable_init(void) ...@@ -1059,7 +1059,7 @@ pdc_stable_init(void)
pdcs_osid = (u16)(result >> 16); pdcs_osid = (u16)(result >> 16);
/* For now we'll register the stable kset within this driver */ /* For now we'll register the stable kset within this driver */
stable_kset = kset_create_and_add("stable", NULL, &firmware_kset->kobj); stable_kset = kset_create_and_add("stable", NULL, firmware_kobj);
if (!stable_kset) { if (!stable_kset) {
rc = -ENOMEM; rc = -ENOMEM;
goto fail_firmreg; goto fail_firmreg;
......
...@@ -210,8 +210,8 @@ extern struct kset *kernel_kset; ...@@ -210,8 +210,8 @@ extern struct kset *kernel_kset;
extern struct kobject *hypervisor_kobj; extern struct kobject *hypervisor_kobj;
/* The global /sys/power/ kset for people to chain off of */ /* The global /sys/power/ kset for people to chain off of */
extern struct kset *power_kset; extern struct kset *power_kset;
/* The global /sys/firmware/ kset for people to chain off of */ /* The global /sys/firmware/ kobject for people to chain off of */
extern struct kset *firmware_kset; extern struct kobject *firmware_kobj;
extern int __must_check subsystem_register(struct kset *); extern int __must_check subsystem_register(struct kset *);
extern void subsystem_unregister(struct kset *); extern void subsystem_unregister(struct kset *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment