Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754091AbbL3A2M (ORCPT ); Tue, 29 Dec 2015 19:28:12 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:59899 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753613AbbL3A2J (ORCPT ); Tue, 29 Dec 2015 19:28:09 -0500 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 X-AuditID: cbfee691-f79766d0000012b6-7a-56832517d95d Content-transfer-encoding: 8BIT Message-id: <56832516.5020201@samsung.com> Date: Wed, 30 Dec 2015 09:28:06 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Charles Keepax Cc: myungjoo.ham@samsung.com, linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com Subject: Re: [PATCH] extcon: arizona: Use DAPM mutex helper functions References: <1451406723-32040-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> In-reply-to: <1451406723-32040-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnkeLIzCtJLcpLzFFi42JZI2JSqCuu2hxm8Oscv8W/KTfYLS7vmsNm cbtxBZvF8rf/2RxYPF5O/M3m0bdlFaPH501yAcxRXDYpqTmZZalF+nYJXBkfv71nL5jMVTHh +xeWBsY1HF2MnBwSAiYSHzt/MkHYYhIX7q1n62Lk4hASWMEoMXPXJiaYok1955khErMYJfa+ PweW4BUQlPgx+R5LFyMHB7OAvMSRS9kgYWYBdYlJ8xZB1T9glFi+9hIrSA2vgJbEgd9aIDUs AqoS91o2sIHYbEDh/S9usIGUiApESHSfqAQJiwhYSExZcosZYmSixMVLbYwgtrCAq8Ted5/B bCGBUInPrz6xgticAmESz/tOMYGslRDYxi5x4fxxZohdAhLfJh8CO1NCQFZi0wFmiLckJQ6u uMEygVFsFpJnZiE8MwvJMwsYm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c5Nk96a5he+0Pk4In/vL9ilvN9mWfJ+Tr0+/cF ip5HA4REJJboPXjAFzL50DaV8pPy8lMmvVil3X2v/dmkr4+XTex8HXXnupBoedLU5L3rb+kp vJl07Z68jtNsV/8EK7ubP5YUlJxnfrZI/9KSRSwP4m9vvuBy6u+kG62X+G1F71onhjHvPajE UpyRaKjFXFScCAAxEGIY5wIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1505 Lines: 44 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 > --- > 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/