Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[sfrench/cifs-2.6.git] / drivers / acpi / thermal.c
index 1ada017d01efb8c8d03630b7c87bd7b01565fd5b..88a6fc7fd271e54dd63d1fabd537878276bf3a21 100644 (file)
@@ -827,6 +827,9 @@ static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file)
 static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
 {
        struct acpi_thermal *tz = seq->private;
+       struct acpi_device *device;
+       acpi_status status;
+
        int i = 0;
        int j = 0;
 
@@ -849,9 +852,10 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
                           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]);
+                       status = acpi_bus_get_device(tz->trips.passive.devices.
+                                                    handles[j], &device);
+                       seq_printf(seq, "%4.4s ", status ? "" :
+                                  acpi_device_bid(device));
                }
                seq_puts(seq, "\n");
        }
@@ -862,9 +866,13 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
                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++){
+                       status = acpi_bus_get_device(tz->trips.active[i].
+                                                    devices.handles[j],
+                                                    &device);
+                       seq_printf(seq, "%4.4s ", status ? "" :
+                                  acpi_device_bid(device));
+               }
                seq_puts(seq, "\n");
        }