mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: myungjoo.ham@samsung.com, patches@opensource.wolfsonmicro.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] extcon: arizona: Fix race with microphone detection and removal
Date: Mon, 04 Nov 2013 09:38:00 +0900	[thread overview]
Message-ID: <5276EC68.1040505@samsung.com> (raw)
In-Reply-To: <1382890752-30970-2-git-send-email-ckeepax@opensource.wolfsonmicro.com>

On 10/28/2013 01:19 AM, Charles Keepax wrote:
> The microphone detection code is run as delayed work to provide
> additional debounce, it is possible that the jack could have been
> removed by the time we process the microphone detection. Turn this case
> into a no op.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
> 
> As Lee Jones took the first patch (extcon: arizona: Add
> defines for microphone detection levels) of my series
> yesterday through his tree I have based this patch on the
> extcon tree without that change applied.
> 
> Thanks,
> Charles
> 
>  drivers/extcon/extcon-arizona.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
> index dac8ba0..9c20850 100644
> --- a/drivers/extcon/extcon-arizona.c
> +++ b/drivers/extcon/extcon-arizona.c
> @@ -773,6 +773,12 @@ static void arizona_micd_detect(struct work_struct *work)
>  
>  	mutex_lock(&info->lock);
>  
> +	if (!info->cable) {
> +		dev_dbg(arizona->dev, "Ignoring MICDET for removed cable\n");
> +		mutex_unlock(&info->lock);
> +		return;
> +	}
> +
>  	for (i = 0; i < 10 && !(val & 0x7fc); i++) {
>  		ret = regmap_read(arizona->regmap, ARIZONA_MIC_DETECT_3, &val);
>  		if (ret != 0) {
> 

This patch has build break as below log:

drivers/extcon/extcon-arizona.c: In function ‘arizona_micd_detect’:
drivers/extcon/extcon-arizona.c:776:11: error: ‘struct arizona_extcon_info’ has no member named ‘cable’

The arizona_extcon_info structure hasn't included 'cable' field.

Cheers,
Chanwoo Choi

  reply	other threads:[~2013-11-04  0:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-27 16:19 [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal Charles Keepax
2013-10-27 16:19 ` [PATCH 2/2] extcon: arizona: Fix race with microphone detection and removal Charles Keepax
2013-11-04  0:38   ` Chanwoo Choi [this message]
2013-11-04  9:11     ` Charles Keepax
2013-11-04  0:32 ` [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal Chanwoo Choi
2013-11-04  9:21   ` Charles Keepax
2013-11-04  9:41     ` Chanwoo Choi

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=5276EC68.1040505@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome