Commit 49c7db1f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge back earlier thermal core updates for 7.1

parents 9e07e3b8 94547142
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -472,6 +472,7 @@ of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
remove_qos_req:
	dev_pm_qos_remove_request(&dfc->req_max_freq);
free_table:
	if (!dfc->em_pd)
		kfree(dfc->freq_table);
free_dfc:
	kfree(dfc);
+1 −1
Original line number Diff line number Diff line
@@ -863,7 +863,7 @@ static int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
		goto free_mem;

	dev->id = result;
	sprintf(dev->name, "cdev%d", dev->id);
	snprintf(dev->name, sizeof(dev->name), "cdev%d", dev->id);
	result =
	    sysfs_create_link(&tz->device.kobj, &cdev->device.kobj, dev->name);
	if (result)
+3 −4
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/string_choices.h>
#include <linux/jiffies.h>

#include "thermal_core.h"
@@ -56,10 +57,8 @@ mode_show(struct device *dev, struct device_attribute *attr, char *buf)

	guard(thermal_zone)(tz);

	if (tz->mode == THERMAL_DEVICE_ENABLED)
		return sysfs_emit(buf, "enabled\n");

	return sysfs_emit(buf, "disabled\n");
	return sysfs_emit(buf, "%s\n",
		str_enabled_disabled(tz->mode == THERMAL_DEVICE_ENABLED));
}

static ssize_t