aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-08-04 09:33:40 -0700
committerKevin Hilman <khilman@linaro.org>2015-09-08 09:22:56 -0700
commit3ef0b3391b510673ab51947dffeb6e6ba2ae8b01 (patch)
treee16950f71c4b0c476b7f73e484525dac73dbb61e
parentdf2c5365a9d741659cc5d8c83181f8b9b418b458 (diff)
downloadlinux-linaro-stable-3ef0b3391b510673ab51947dffeb6e6ba2ae8b01.tar.gz
thermal: power_allocator: do not use devm* interfaces
The code in question is called outside of standard driver probe()/remove() callbacks and thus will not benefit from use of devm* infrastructure. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> (cherry picked from commit cf736ea6f902c26e03895dc7f5ccbc55cdc68e6e) Signed-off-by: Kevin Hilman <khilman@linaro.org>
-rw-r--r--drivers/thermal/power_allocator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c
index 63a448f9d93b..7006860f2f36 100644
--- a/drivers/thermal/power_allocator.c
+++ b/drivers/thermal/power_allocator.c
@@ -334,7 +334,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 +426,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 +468,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;
}