diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 299c0fb165930..f4033865b093a 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -939,7 +939,12 @@ ssize_t weight_store(struct device *dev, struct device_attribute *attr, /* Don't race with governors using the 'weight' value */ mutex_lock(&instance->tz->lock); + instance->weight = weight; + + thermal_governor_update_tz(instance->tz, + THERMAL_INSTANCE_WEIGHT_CHANGED); + mutex_unlock(&instance->tz->lock); return count; diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 4d96fefb27679..9d0427da32af5 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -53,6 +53,7 @@ enum thermal_notify_event { THERMAL_EVENT_KEEP_ALIVE, /* Request for user space handler to respond */ THERMAL_TZ_BIND_CDEV, /* Cooling dev is bind to the thermal zone */ THERMAL_TZ_UNBIND_CDEV, /* Cooling dev is unbind from the thermal zone */ + THERMAL_INSTANCE_WEIGHT_CHANGED, /* Thermal instance weight changed */ }; /**