diff options
author | Gary S. Robertson <gary.robertson@linaro.org> | 2015-10-21 02:01:41 -0500 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2015-10-21 02:03:14 -0500 |
commit | b2d9f853f9881e3f62fb0c94776d4a04cafd7c07 (patch) | |
tree | 8cafd52dddc2945c5670cadd0c9c71a7cfccbc77 /drivers/thermal/power_allocator.c | |
parent | 60f13d2d65b7c0c4096321ee88670e56954ee215 (diff) | |
parent | 42ed40620897231c6eb5c40a161d374e4dd09f09 (diff) |
Merge tag 'lsk-v3.18-15.09' of http://git.linaro.org/kernel/linux-linaro-stable into linux-linaro-lng-v3.18linux-lng-3.18.20-2015.10linux-linaro-lng-v3.18
LSK 15.09 v3.18
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
Diffstat (limited to 'drivers/thermal/power_allocator.c')
-rw-r--r-- | drivers/thermal/power_allocator.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c index 63a448f9d93b..251676902869 100644 --- a/drivers/thermal/power_allocator.c +++ b/drivers/thermal/power_allocator.c @@ -258,8 +258,7 @@ static int allocate_power(struct thermal_zone_device *tz, BUILD_BUG_ON(sizeof(*req_power) != sizeof(*granted_power)); BUILD_BUG_ON(sizeof(*req_power) != sizeof(*extra_actor_power)); BUILD_BUG_ON(sizeof(*req_power) != sizeof(*weighted_req_power)); - req_power = devm_kcalloc(&tz->device, num_actors * 5, - sizeof(*req_power), GFP_KERNEL); + req_power = kcalloc(num_actors * 5, sizeof(*req_power), GFP_KERNEL); if (!req_power) { ret = -ENOMEM; goto unlock; @@ -334,7 +333,7 @@ static int allocate_power(struct thermal_zone_device *tz, max_allocatable_power, current_temp, (s32)control_temp - (s32)current_temp); - devm_kfree(&tz->device, req_power); + kfree(req_power); unlock: mutex_unlock(&tz->lock); @@ -426,7 +425,7 @@ static int power_allocator_bind(struct thermal_zone_device *tz) return -EINVAL; } - params = devm_kzalloc(&tz->device, sizeof(*params), GFP_KERNEL); + params = kzalloc(sizeof(*params), GFP_KERNEL); if (!params) return -ENOMEM; @@ -468,14 +467,14 @@ static int power_allocator_bind(struct thermal_zone_device *tz) return 0; free: - devm_kfree(&tz->device, params); + kfree(params); return ret; } static void power_allocator_unbind(struct thermal_zone_device *tz) { dev_dbg(&tz->device, "Unbinding from thermal zone %d\n", tz->id); - devm_kfree(&tz->device, tz->governor_data); + kfree(tz->governor_data); tz->governor_data = NULL; } |