diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:32:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:32:11 -0400 |
commit | c11f6c82581e8be4e1829c677db54e7f55cebece (patch) | |
tree | 1a116241b0831ded998aabe800bdc24104cbd826 /drivers/acpi/container.c | |
parent | 40aba218969914d1b225e742617adb921cf94eae (diff) | |
parent | 193a6dec1c0246a80b6d0101e4f351ccf877bcac (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (119 commits)
ACPI: don't pass handle for fixed hardware notifications
ACPI: remove null pointer checks in deferred execution path
ACPI: simplify deferred execution path
acerhdf: additional BIOS versions
acerhdf: convert to dev_pm_ops
acerhdf: fix fan control for AOA150 model
thermal: add missing Kconfig dependency
acpi: switch /proc/acpi/{debug_layer,debug_level} to seq_file
hp-wmi: fix rfkill memory leak on unload
ACPI: remove unnecessary #ifdef CONFIG_DMI
ACPI: linux/acpi.h should not include linux/dmi.h
hwmon driver for ACPI 4.0 power meters
topstar-laptop: add new driver for hotkeys support on Topstar N01
thinkpad_acpi: fix rfkill memory leak on unload
thinkpad-acpi: report brightness events when required
thinkpad-acpi: don't poll by default any of the reserved hotkeys
thinkpad-acpi: Fix procfs hotkey reset command
thinkpad-acpi: deprecate hotkey_bios_mask
thinkpad-acpi: hotkey poll fixes
thinkpad-acpi: be more strict when detecting a ThinkPad
...
Diffstat (limited to 'drivers/acpi/container.c')
-rw-r--r-- | drivers/acpi/container.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index fe0cdf83641a..642bb305cb65 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <acpi/acpi_drivers.h> | 35 | #include <acpi/acpi_drivers.h> |
36 | #include <acpi/container.h> | 36 | #include <acpi/container.h> |
37 | 37 | ||
38 | #define PREFIX "ACPI: " | ||
39 | |||
38 | #define ACPI_CONTAINER_DEVICE_NAME "ACPI container device" | 40 | #define ACPI_CONTAINER_DEVICE_NAME "ACPI container device" |
39 | #define ACPI_CONTAINER_CLASS "container" | 41 | #define ACPI_CONTAINER_CLASS "container" |
40 | 42 | ||
@@ -200,20 +202,17 @@ container_walk_namespace_cb(acpi_handle handle, | |||
200 | u32 lvl, void *context, void **rv) | 202 | u32 lvl, void *context, void **rv) |
201 | { | 203 | { |
202 | char *hid = NULL; | 204 | char *hid = NULL; |
203 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
204 | struct acpi_device_info *info; | 205 | struct acpi_device_info *info; |
205 | acpi_status status; | 206 | acpi_status status; |
206 | int *action = context; | 207 | int *action = context; |
207 | 208 | ||
208 | 209 | status = acpi_get_object_info(handle, &info); | |
209 | status = acpi_get_object_info(handle, &buffer); | 210 | if (ACPI_FAILURE(status)) { |
210 | if (ACPI_FAILURE(status) || !buffer.pointer) { | ||
211 | return AE_OK; | 211 | return AE_OK; |
212 | } | 212 | } |
213 | 213 | ||
214 | info = buffer.pointer; | ||
215 | if (info->valid & ACPI_VALID_HID) | 214 | if (info->valid & ACPI_VALID_HID) |
216 | hid = info->hardware_id.value; | 215 | hid = info->hardware_id.string; |
217 | 216 | ||
218 | if (hid == NULL) { | 217 | if (hid == NULL) { |
219 | goto end; | 218 | goto end; |
@@ -240,7 +239,7 @@ container_walk_namespace_cb(acpi_handle handle, | |||
240 | } | 239 | } |
241 | 240 | ||
242 | end: | 241 | end: |
243 | kfree(buffer.pointer); | 242 | kfree(info); |
244 | 243 | ||
245 | return AE_OK; | 244 | return AE_OK; |
246 | } | 245 | } |