From: Thomas Renninger export acpi_handle to user space doesn't make sense. use the object name shown in ACPI namespace instead. Signed-off-by: Zhang Rui --- drivers/acpi/thermal.c | 33 +++++++++++++++++---------------- 1 files changed, 17 insertions(+), 16 deletions(-) Index: linux-2.6.21-rc5/drivers/acpi/thermal.c =================================================================== --- linux-2.6.21-rc5.orig/drivers/acpi/thermal.c 2007-03-26 14:24:41.000000000 +0800 +++ linux-2.6.21-rc5/drivers/acpi/thermal.c 2007-04-29 11:37:18.000000000 +0800 @@ -586,7 +586,7 @@ static void acpi_thermal_active(struct a int i = 0; int j = 0; unsigned long maxtemp = 0; - + struct acpi_device *device; if (!tz) return; @@ -612,17 +612,17 @@ static void acpi_thermal_active(struct a acpi_bus_set_power(active->devices. handles[j], ACPI_STATE_D0); + acpi_bus_get_device(active->devices.handles[j], &device); if (result) { printk(KERN_WARNING PREFIX - "Unable to turn cooling device [%p] 'on'\n", - active->devices. - handles[j]); + "Unable to turn cooling device [%4.4s] 'on', result is %d\n", + acpi_device_bid(device), result); continue; } active->flags.enabled = 1; ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Cooling device [%p] now 'on'\n", - active->devices.handles[j])); + "Cooling device [%4.4s] now 'on'\n", + acpi_device_bid(device))); } continue; } @@ -637,16 +637,17 @@ static void acpi_thermal_active(struct a for (j = 0; j < active->devices.count; j++) { result = acpi_bus_set_power(active->devices.handles[j], ACPI_STATE_D3); + acpi_bus_get_device(active->devices.handles[j], &device); if (result) { printk(KERN_WARNING PREFIX - "Unable to turn cooling device [%p] 'off'\n", - active->devices.handles[j]); + "Unable to turn cooling device [%4.4s] 'off'\n", + acpi_device_bid(device)); continue; } active->flags.enabled = 0; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Cooling device [%p] now 'off'\n", - active->devices.handles[j])); + acpi_device_bid(device))); } } } @@ -840,7 +841,7 @@ static int acpi_thermal_trip_seq_show(st struct acpi_thermal *tz = seq->private; int i = 0; int j = 0; - + struct acpi_device *device; if (!tz) goto end; @@ -860,9 +861,8 @@ static int acpi_thermal_trip_seq_show(st tz->trips.passive.tc1, tz->trips.passive.tc2, tz->trips.passive.tsp); for (j = 0; j < tz->trips.passive.devices.count; j++) { - - seq_printf(seq, "0x%p ", - tz->trips.passive.devices.handles[j]); + acpi_bus_get_device(tz->trips.passive.devices.handles[j], &device); + seq_printf(seq, "%4.4s ", acpi_device_bid(device)); } seq_puts(seq, "\n"); } @@ -873,9 +873,10 @@ static int acpi_thermal_trip_seq_show(st seq_printf(seq, "active[%d]: %ld C: devices=", i, KELVIN_TO_CELSIUS(tz->trips.active[i].temperature)); - for (j = 0; j < tz->trips.active[i].devices.count; j++) - seq_printf(seq, "0x%p ", - tz->trips.active[i].devices.handles[j]); + for (j = 0; j < tz->trips.active[i].devices.count; j++) { + acpi_bus_get_device(tz->trips.active[i].devices.handles[j], &device); + seq_printf(seq, "%4.4s ", acpi_device_bid(device)); + } seq_puts(seq, "\n"); }