* [PATCH] extcon: arizona: Use DAPM mutex helper functions
@ 2015-12-29 16:32 Charles Keepax
2015-12-30 0:28 ` Chanwoo Choi
0 siblings, 1 reply; 2+ messages in thread
From: Charles Keepax @ 2015-12-29 16:32 UTC (permalink / raw)
To: cw00.choi; +Cc: myungjoo.ham, linux-kernel, patches
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)
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] extcon: arizona: Use DAPM mutex helper functions
2015-12-29 16:32 [PATCH] extcon: arizona: Use DAPM mutex helper functions Charles Keepax
@ 2015-12-30 0:28 ` Chanwoo Choi
0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2015-12-30 0:28 UTC (permalink / raw)
To: Charles Keepax; +Cc: myungjoo.ham, linux-kernel, patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-30 0:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-29 16:32 [PATCH] extcon: arizona: Use DAPM mutex helper functions Charles Keepax
2015-12-30 0:28 ` Chanwoo Choi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox