Skip to content

Commit

Permalink
[ARM] omap: resource: Only update resource level if there is a change
Browse files Browse the repository at this point in the history
Previosuly update_resource_level() would always call the change_level()
function, even if there was no change necessary.

Change-Id: I688484e227834a064bb061ebae90be480bed79b3
Signed-off-by: Mike Chan <mike@android.com>
  • Loading branch information
Mike Chan committed Apr 24, 2010
1 parent cc1003c commit 4d43115
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm/plat-omap/resource.c
Expand Up @@ -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);
Expand Down

0 comments on commit 4d43115

Please sign in to comment.