Previosuly update_resource_level() would always call the change_level() function, even if there was no change necessary. Signed-off-by: Mike Chan <mike@xxxxxxxxxxx> --- arch/arm/plat-omap/resource.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-omap/resource.c b/arch/arm/plat-omap/resource.c index 6d3bba6..ff5a938 100644 --- a/arch/arm/plat-omap/resource.c +++ b/arch/arm/plat-omap/resource.c @@ -104,7 +104,7 @@ static int update_resource_level(struct shared_resource *resp) { struct users_list *user; unsigned long target_level; - int ret; + int ret = 0; mutex_lock(&resp->resource_mutex); /* Regenerate the target_value for the resource */ @@ -125,6 +125,9 @@ static int update_resource_level(struct shared_resource *resp) } mutex_unlock(&resp->resource_mutex); + if (resp->curr_level == target_level) + return ret; + pr_debug("SRF: Changing Level for resource %s to %ld\n", resp->name, target_level); ret = resp->ops->change_level(resp, target_level); -- 1.7.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html