aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/system.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-25 11:34:42 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-25 11:35:13 -0500
commitdf8dc74e8a383eaf2d9b44b80a71ec6f0e52b42e (patch)
treebc3799a43e8b94fa84b32e37b1c124d5e4868f50 /drivers/acpi/system.c
parent556a169dab38b5100df6f4a45b655dddd3db94c1 (diff)
parent4a3ad20ccd8f4d2a0535cf98fa83f7b561ba59a9 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
This can be broken down into these major areas: - Documentation updates (language translations and fixes, as well as kobject and kset documenatation updates.) - major kset/kobject/ktype rework and fixes. This cleans up the kset and kobject and ktype relationship and architecture, making sense of things now, and good documenation and samples are provided for others to use. Also the attributes for kobjects are much easier to handle now. This cleaned up a LOT of code all through the kernel, making kobjects easier to use if you want to. - struct bus_type has been reworked to now handle the lifetime rules properly, as the kobject is properly dynamic. - struct driver has also been reworked, and now the lifetime issues are resolved. - the block subsystem has been converted to use struct device now, and not "raw" kobjects. This patch has been in the -mm tree for over a year now, and finally all the issues are worked out with it. Older distros now properly work with new kernels, and no userspace updates are needed at all. - nozomi driver is added. This has also been in -mm for a long time, and many people have asked for it to go in. It is now in good enough shape to do so. - lots of class_device conversions to use struct device instead. The tree is almost all cleaned up now, only SCSI and IB is the remaining code to fix up... * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (196 commits) Driver core: coding style fixes Kobject: fix coding style issues in kobject c files Kobject: fix coding style issues in kobject.h Driver core: fix coding style issues in device.h spi: use class iteration api scsi: use class iteration api rtc: use class iteration api power supply : use class iteration api ieee1394: use class iteration api Driver Core: add class iteration api Driver core: Cleanup get_device_parent() in device_add() and device_move() UIO: constify function pointer tables Driver Core: constify the name passed to platform_device_register_simple driver core: fix build with SYSFS=n sysfs: make SYSFS_DEPRECATED depend on SYSFS Driver core: use LIST_HEAD instead of call to INIT_LIST_HEAD in __init kobject: add sample code for how to use ksets/ktypes/kobjects kobject: add sample code for how to use kobjects in a simple manner. kobject: update the kobject/kset documentation kobject: remove old, outdated documentation. ...
Diffstat (limited to 'drivers/acpi/system.c')
-rw-r--r--drivers/acpi/system.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index edee2806e37b..5ffe0ea18967 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -58,7 +58,7 @@ module_param_call(acpica_version, NULL, param_get_acpica_version, NULL, 0444);
58 FS Interface (/sys) 58 FS Interface (/sys)
59 -------------------------------------------------------------------------- */ 59 -------------------------------------------------------------------------- */
60static LIST_HEAD(acpi_table_attr_list); 60static LIST_HEAD(acpi_table_attr_list);
61static struct kobject tables_kobj; 61static struct kobject *tables_kobj;
62 62
63struct acpi_table_attr { 63struct acpi_table_attr {
64 struct bin_attribute attr; 64 struct bin_attribute attr;
@@ -135,11 +135,9 @@ 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 = kobject_create_and_add("tables", acpi_kobj);
139 kobject_set_name(&tables_kobj, "tables"); 139 if (!tables_kobj)
140 result = kobject_register(&tables_kobj); 140 return -ENOMEM;
141 if (result)
142 return result;
143 141
144 do { 142 do {
145 result = acpi_get_table_by_index(table_index, &table_header); 143 result = acpi_get_table_by_index(table_index, &table_header);
@@ -153,7 +151,7 @@ static int acpi_system_sysfs_init(void)
153 151
154 acpi_table_attr_init(table_attr, table_header); 152 acpi_table_attr_init(table_attr, table_header);
155 result = 153 result =
156 sysfs_create_bin_file(&tables_kobj, 154 sysfs_create_bin_file(tables_kobj,
157 &table_attr->attr); 155 &table_attr->attr);
158 if (result) { 156 if (result) {
159 kfree(table_attr); 157 kfree(table_attr);
@@ -163,6 +161,7 @@ static int acpi_system_sysfs_init(void)
163 &acpi_table_attr_list); 161 &acpi_table_attr_list);
164 } 162 }
165 } while (!result); 163 } while (!result);
164 kobject_uevent(tables_kobj, KOBJ_ADD);
166 165
167 return 0; 166 return 0;
168} 167}