提交 6a6cd25b 编写于 作者: C Christophe Jaillet 提交者: Zhang Rui

thermal: core: Use the new 'thermal_zone_destroy_device_groups()' helper function

Simplify code by using the new 'thermal_zone_destroy_device_groups()'
helper function.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NZhang Rui <rui.zhang@intel.com>
上级 32fa5ba3
......@@ -836,11 +836,7 @@ static void thermal_release(struct device *dev)
if (!strncmp(dev_name(dev), "thermal_zone",
sizeof("thermal_zone") - 1)) {
tz = to_thermal_zone(dev);
kfree(tz->trip_type_attrs);
kfree(tz->trip_temp_attrs);
kfree(tz->trip_hyst_attrs);
kfree(tz->trips_attribute_group.attrs);
kfree(tz->device.groups);
thermal_zone_destroy_device_groups(tz);
kfree(tz);
} else if (!strncmp(dev_name(dev), "cooling_device",
sizeof("cooling_device") - 1)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册