From: Chanwoo Choi <cw00.choi@samsung.com>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: myungjoo.ham@samsung.com, linux-kernel@vger.kernel.org,
patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH] extcon: arizona: Use DAPM mutex helper functions
Date: Wed, 30 Dec 2015 09:28:06 +0900 [thread overview]
Message-ID: <56832516.5020201@samsung.com> (raw)
In-Reply-To: <1451406723-32040-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>
On 2015년 12월 30일 01:32, Charles Keepax wrote:
> We should be using the helper functions to lock the DAPM mutex not
> accessing it directly. There are no ill effects of this as the moment
> but it is best practice, and the implementation could be changed in the
> future.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
> drivers/extcon/extcon-arizona.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
> index c121d01..1d8e0a5 100644
> --- a/drivers/extcon/extcon-arizona.c
> +++ b/drivers/extcon/extcon-arizona.c
> @@ -185,7 +185,7 @@ static void arizona_extcon_hp_clamp(struct arizona_extcon_info *info,
> break;
> };
>
> - mutex_lock(&arizona->dapm->card->dapm_mutex);
> + snd_soc_dapm_mutex_lock(arizona->dapm);
>
> arizona->hpdet_clamp = clamp;
>
> @@ -227,7 +227,7 @@ static void arizona_extcon_hp_clamp(struct arizona_extcon_info *info,
> ret);
> }
>
> - mutex_unlock(&arizona->dapm->card->dapm_mutex);
> + snd_soc_dapm_mutex_unlock(arizona->dapm);
> }
>
> static void arizona_extcon_set_mode(struct arizona_extcon_info *info, int mode)
>
Looks good to me. Applied it.
Thanks,
Chanwoo Choi
prev parent reply other threads:[~2015-12-30 0:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-29 16:32 [PATCH] extcon: arizona: Use DAPM mutex helper functions Charles Keepax
2015-12-30 0:28 ` Chanwoo Choi [this message]
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=56832516.5020201@samsung.com \
--to=cw00.choi@samsung.com \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=patches@opensource.wolfsonmicro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.