Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1299050 > unrolled thread
| Started by | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> |
|---|---|
| First post | 2015-12-29 17:40 +0100 |
| Last post | 2015-12-30 01:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] extcon: arizona: Use DAPM mutex helper functions Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-12-29 17:40 +0100
Re: [PATCH] extcon: arizona: Use DAPM mutex helper functions Chanwoo Choi <cw00.choi@samsung.com> - 2015-12-30 01:30 +0100
| From | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> |
|---|---|
| Date | 2015-12-29 17:40 +0100 |
| Subject | [PATCH] extcon: arizona: Use DAPM mutex helper functions |
| Message-ID | <qL5tw-2Yw-21@gated-at.bofh.it> |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Date | 2015-12-30 01:30 +0100 |
| Message-ID | <qLcOl-7E2-1@gated-at.bofh.it> |
| In reply to | #1299050 |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web