summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-03 00:19:59 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-25 05:40:23 +0100
commit99e0d2fc6c60ca44f56203eeda9fc0e07b508f06 (patch)
treeadb8b295ef827d15a01595c451a1891e28801fd4
parentkset: convert edd to use kset_create (diff)
downloadlinux-99e0d2fc6c60ca44f56203eeda9fc0e07b508f06.tar.xz
linux-99e0d2fc6c60ca44f56203eeda9fc0e07b508f06.zip
kobject: convert /sys/firmware/acpi/ to use kobject_create
We don't need a kset here, a simple kobject will do just fine, so dynamically create the kobject and use it. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to '')
-rw-r--r--drivers/acpi/bus.c11
-rw-r--r--drivers/acpi/system.c2
-rw-r--r--include/acpi/acpi_bus.h2
3 files changed, 8 insertions, 7 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 7c172d9d7acf..e550da684a47 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -743,7 +743,7 @@ static int __init acpi_bus_init(void)
return -ENODEV;
}
-decl_subsys(acpi, NULL);
+struct kobject *acpi_kobj;
static int __init acpi_init(void)
{
@@ -755,10 +755,11 @@ static int __init acpi_init(void)
return -ENODEV;
}
- result = firmware_register(&acpi_subsys);
- if (result < 0)
- printk(KERN_WARNING "%s: firmware_register error: %d\n",
- __FUNCTION__, result);
+ acpi_kobj = kobject_create_and_add("acpi", &firmware_kset->kobj);
+ if (!acpi_kobj) {
+ printk(KERN_WARNING "%s: kset create error\n", __FUNCTION__);
+ acpi_kobj = NULL;
+ }
result = acpi_bus_init();
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index edee2806e37b..c22b93aab7fe 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -135,7 +135,7 @@ static int acpi_system_sysfs_init(void)
int table_index = 0;
int result;
- tables_kobj.parent = &acpi_subsys.kobj;
+ tables_kobj.parent = acpi_kobj;
kobject_set_name(&tables_kobj, "tables");
result = kobject_register(&tables_kobj);
if (result)
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 7b74b60a68a4..fb7171b1bd22 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -319,7 +319,7 @@ struct acpi_bus_event {
u32 data;
};
-extern struct kset acpi_subsys;
+extern struct kobject *acpi_kobj;
extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int);
/*
* External Functions