@@ -422,7 +422,8 @@ static acpi_status intel_menlow_register_sensor(acpi_handle handle, u32 lvl,
result = intel_menlow_add_one_attribute("aux0", 0644,
aux0_show, aux0_store,
- &thermal->device, handle);
+ thermal_zone_device(thermal),
+ handle);
if (result)
return AE_ERROR;
@@ -436,7 +437,8 @@ static acpi_status intel_menlow_register_sensor(acpi_handle handle, u32 lvl,
result = intel_menlow_add_one_attribute("aux1", 0644,
aux1_show, aux1_store,
- &thermal->device, handle);
+ thermal_zone_device(thermal),
+ handle);
if (result) {
intel_menlow_unregister_sensor();
return AE_ERROR;
@@ -449,7 +451,8 @@ static acpi_status intel_menlow_register_sensor(acpi_handle handle, u32 lvl,
result = intel_menlow_add_one_attribute("bios_enabled", 0444,
bios_enabled_show, NULL,
- &thermal->device, handle);
+ thermal_zone_device(thermal),
+ handle);
if (result) {
intel_menlow_unregister_sensor();
return AE_ERROR;
In order to get the device associated with the thermal zone, let's use the wrapper thermal_zone_device() instead of accessing directly the content of the thermal zone device structure. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- drivers/thermal/intel/intel_menlow.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)