Commit 9686f04a authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

thermal: ACPI: Discard trips table after zone registration



Because the thermal core creates and uses its own copy of the trips
table passed to thermal_zone_device_register_with_trips(), it is not
necessary to hold on to a local copy of it any more after the given
thermal zone has been registered.

Accordingly, modify the ACPI thermal driver to store the trips table
passed to thermal_zone_device_register_with_trips() in a local variable
which is automatically discarded when acpi_thermal_add() returns to
its caller.

Also make some additional code simplifications unlocked by the above
change.

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 9b0a6275
Supports Markdown
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