]> Git Repo - linux.git/blobdiff - drivers/thermal/power_allocator.c
selftests: pmtu: Factor out MTU parsing helper
[linux.git] / drivers / thermal / power_allocator.c
index b4d3116cfdafe81767b2b1c91fcab4a034f29041..3055f9a12a17087cfee105400b2cca3e68cbb166 100644 (file)
@@ -523,6 +523,7 @@ static void allow_maximum_power(struct thermal_zone_device *tz)
        struct thermal_instance *instance;
        struct power_allocator_params *params = tz->governor_data;
 
+       mutex_lock(&tz->lock);
        list_for_each_entry(instance, &tz->thermal_instances, tz_node) {
                if ((instance->trip != params->trip_max_desired_temperature) ||
                    (!cdev_is_power_actor(instance->cdev)))
@@ -534,6 +535,7 @@ static void allow_maximum_power(struct thermal_zone_device *tz)
                mutex_unlock(&instance->cdev->lock);
                thermal_cdev_update(instance->cdev);
        }
+       mutex_unlock(&tz->lock);
 }
 
 /**
This page took 0.032478 seconds and 4 git commands to generate.