Commit 8c6c92d1 authored by Andy Grover's avatar Andy Grover

Merge groveronline.com:/root/bk/linux-2.5

into groveronline.com:/root/bk/linux-acpi
parents f208c0ee 9e213819
...@@ -717,6 +717,9 @@ acpi_os_wait_semaphore( ...@@ -717,6 +717,9 @@ acpi_os_wait_semaphore(
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Waiting for semaphore[%p|%d|%d]\n", handle, units, timeout)); ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Waiting for semaphore[%p|%d|%d]\n", handle, units, timeout));
if (in_atomic())
timeout = 0;
switch (timeout) switch (timeout)
{ {
/* /*
...@@ -838,7 +841,7 @@ acpi_os_writable(void *ptr, u32 len) ...@@ -838,7 +841,7 @@ acpi_os_writable(void *ptr, u32 len)
u32 u32
acpi_os_get_thread_id (void) acpi_os_get_thread_id (void)
{ {
if (!in_interrupt()) if (!in_atomic())
return current->pid; return current->pid;
return 0; return 0;
......
...@@ -1761,6 +1761,9 @@ acpi_cpufreq_init ( ...@@ -1761,6 +1761,9 @@ acpi_cpufreq_init (
ACPI_FUNCTION_TRACE("acpi_cpufreq_init"); ACPI_FUNCTION_TRACE("acpi_cpufreq_init");
if (!pr->flags.performance)
return_VALUE(0);
if (cpufreq_usage_count) { if (cpufreq_usage_count) {
if (pr->flags.performance == 1) if (pr->flags.performance == 1)
cpufreq_usage_count++; cpufreq_usage_count++;
......
...@@ -606,28 +606,31 @@ int acpi_device_set_context(struct acpi_device * device, int type) ...@@ -606,28 +606,31 @@ int acpi_device_set_context(struct acpi_device * device, int type)
void acpi_device_get_debug_info(struct acpi_device * device, acpi_handle handle, int type) void acpi_device_get_debug_info(struct acpi_device * device, acpi_handle handle, int type)
{ {
#ifdef CONFIG_ACPI_DEBUG #ifdef CONFIG_ACPI_DEBUG_OUTPUT
char *type_string = NULL; char *type_string = NULL;
char name[80] = {'?','\0'}; char name[80] = {'?','\0'};
acpi_buffer buffer = {sizeof(name), name}; acpi_buffer buffer = {sizeof(name), name};
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
switch (type) { switch (type) {
case ACPI_BUS_TYPE_DEVICE: case ACPI_BUS_TYPE_DEVICE:
type_string = "Device"; type_string = "Device";
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
break; break;
case ACPI_BUS_TYPE_POWER: case ACPI_BUS_TYPE_POWER:
type_string = "Power Resource"; type_string = "Power Resource";
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
break; break;
case ACPI_BUS_TYPE_PROCESSOR: case ACPI_BUS_TYPE_PROCESSOR:
type_string = "Processor"; type_string = "Processor";
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
break; break;
case ACPI_BUS_TYPE_SYSTEM: case ACPI_BUS_TYPE_SYSTEM:
type_string = "System"; type_string = "System";
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
break; break;
case ACPI_BUS_TYPE_THERMAL: case ACPI_BUS_TYPE_THERMAL:
type_string = "Thermal Zone"; type_string = "Thermal Zone";
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
break; break;
case ACPI_BUS_TYPE_POWER_BUTTON: case ACPI_BUS_TYPE_POWER_BUTTON:
type_string = "Power Button"; type_string = "Power Button";
...@@ -640,7 +643,7 @@ void acpi_device_get_debug_info(struct acpi_device * device, acpi_handle handle, ...@@ -640,7 +643,7 @@ void acpi_device_get_debug_info(struct acpi_device * device, acpi_handle handle,
} }
pr_debug("Found %s %s [%p]\n", type_string, name, handle); pr_debug("Found %s %s [%p]\n", type_string, name, handle);
#endif /*CONFIG_ACPI_DEBUG*/ #endif /*CONFIG_ACPI_DEBUG_OUTPUT*/
} }
static int static int
...@@ -760,7 +763,7 @@ acpi_bus_add ( ...@@ -760,7 +763,7 @@ acpi_bus_add (
* ---------------------- * ----------------------
* If there's a hardware id (_HID) or compatible ids (_CID) we check * If there's a hardware id (_HID) or compatible ids (_CID) we check
* to see if there's a driver installed for this kind of device. Note * to see if there's a driver installed for this kind of device. Note
* that drivers can install before or after a device in enumerated. * that drivers can install before or after a device is enumerated.
* *
* TBD: Assumes LDM provides driver hot-plug capability. * TBD: Assumes LDM provides driver hot-plug capability.
*/ */
...@@ -822,14 +825,10 @@ static int acpi_bus_scan (struct acpi_device *start) ...@@ -822,14 +825,10 @@ static int acpi_bus_scan (struct acpi_device *start)
/* /*
* If this is a scope object then parse it (depth-first). * If this is a scope object then parse it (depth-first).
*/ */
if (type == ACPI_TYPE_ANY) { if (type == ACPI_TYPE_LOCAL_SCOPE) {
/* Hack to get around scope identity problem */ level++;
status = acpi_get_next_object(ACPI_TYPE_ANY, chandle, 0, NULL); phandle = chandle;
if (ACPI_SUCCESS(status)) { chandle = 0;
level++;
phandle = chandle;
chandle = 0;
}
continue; continue;
} }
...@@ -900,11 +899,11 @@ acpi_bus_scan_fixed ( ...@@ -900,11 +899,11 @@ acpi_bus_scan_fixed (
*/ */
if (acpi_fadt.pwr_button == 0) if (acpi_fadt.pwr_button == 0)
result = acpi_bus_add(&device, acpi_root, result = acpi_bus_add(&device, acpi_root,
ACPI_ROOT_OBJECT, ACPI_BUS_TYPE_POWER_BUTTON); NULL, ACPI_BUS_TYPE_POWER_BUTTON);
if (acpi_fadt.sleep_button == 0) if (acpi_fadt.sleep_button == 0)
result = acpi_bus_add(&device, acpi_root, result = acpi_bus_add(&device, acpi_root,
ACPI_ROOT_OBJECT, ACPI_BUS_TYPE_SLEEP_BUTTON); NULL, ACPI_BUS_TYPE_SLEEP_BUTTON);
return_VALUE(result); return_VALUE(result);
} }
......
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