diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-02 19:19:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:23 -0500 |
commit | 99e0d2fc6c60ca44f56203eeda9fc0e07b508f06 (patch) | |
tree | adb8b295ef827d15a01595c451a1891e28801fd4 | |
parent | 9651d350ab2c1b9ef1875be2a9def1c375e6503f (diff) |
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>
-rw-r--r-- | drivers/acpi/bus.c | 11 | ||||
-rw-r--r-- | drivers/acpi/system.c | 2 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 2 |
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) | |||
743 | return -ENODEV; | 743 | return -ENODEV; |
744 | } | 744 | } |
745 | 745 | ||
746 | decl_subsys(acpi, NULL); | 746 | struct kobject *acpi_kobj; |
747 | 747 | ||
748 | static int __init acpi_init(void) | 748 | static int __init acpi_init(void) |
749 | { | 749 | { |
@@ -755,10 +755,11 @@ static int __init acpi_init(void) | |||
755 | return -ENODEV; | 755 | return -ENODEV; |
756 | } | 756 | } |
757 | 757 | ||
758 | result = firmware_register(&acpi_subsys); | 758 | acpi_kobj = kobject_create_and_add("acpi", &firmware_kset->kobj); |
759 | if (result < 0) | 759 | if (!acpi_kobj) { |
760 | printk(KERN_WARNING "%s: firmware_register error: %d\n", | 760 | printk(KERN_WARNING "%s: kset create error\n", __FUNCTION__); |
761 | __FUNCTION__, result); | 761 | acpi_kobj = NULL; |
762 | } | ||
762 | 763 | ||
763 | result = acpi_bus_init(); | 764 | result = acpi_bus_init(); |
764 | 765 | ||
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) | |||
135 | int table_index = 0; | 135 | int table_index = 0; |
136 | int result; | 136 | int result; |
137 | 137 | ||
138 | tables_kobj.parent = &acpi_subsys.kobj; | 138 | tables_kobj.parent = acpi_kobj; |
139 | kobject_set_name(&tables_kobj, "tables"); | 139 | kobject_set_name(&tables_kobj, "tables"); |
140 | result = kobject_register(&tables_kobj); | 140 | result = kobject_register(&tables_kobj); |
141 | if (result) | 141 | 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 { | |||
319 | u32 data; | 319 | u32 data; |
320 | }; | 320 | }; |
321 | 321 | ||
322 | extern struct kset acpi_subsys; | 322 | extern struct kobject *acpi_kobj; |
323 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); | 323 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); |
324 | /* | 324 | /* |
325 | * External Functions | 325 | * External Functions |