public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Mike Chan <mike@android.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] [ARM] omap: resource: Make resource_refresh() thread safe.
Date: Tue, 08 Sep 2009 15:45:50 -0700	[thread overview]
Message-ID: <87eiqhkqch.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1252019887-4463-1-git-send-email-mike@android.com> (Mike Chan's message of "Thu\,  3 Sep 2009 16\:18\:07 -0700")

Mike Chan <mike@android.com> writes:

> Need to lock the res_mutex when traversing the res_list.
>
> Signed-off-by: Mike Chan <mike@android.com>

Looks good, thanks.

Pushed to PM branch and pm-2.6.29.

Kevin

> ---
>  arch/arm/plat-omap/resource.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-omap/resource.c b/arch/arm/plat-omap/resource.c
> index 25072cd..4631912 100644
> --- a/arch/arm/plat-omap/resource.c
> +++ b/arch/arm/plat-omap/resource.c
> @@ -234,11 +234,13 @@ int resource_refresh(void)
>  	struct shared_resource *resp = NULL;
>  	int ret = 0;
>  
> +	down(&res_mutex);
>  	list_for_each_entry(resp, &res_list, node) {
>  		ret = update_resource_level(resp);
>  		if (ret)
>  			break;
>  	}
> +	up(&res_mutex);
>  	return ret;
>  }
>  
> -- 
> 1.5.4.5

  reply	other threads:[~2009-09-08 22:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-03 23:18 [PATCH] [ARM] omap: resource: Make resource_refresh() thread safe Mike Chan
2009-09-08 22:45 ` Kevin Hilman [this message]
2009-09-11  4:12   ` Mike Turquette
2009-09-11 21:10     ` Kevin Hilman
2009-09-11 22:50       ` Mike Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eiqhkqch.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=mike@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox