From 9ef2224d9f2e684da016c8a29ecf6dc548b66e3e Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 28 Jun 2012 13:08:31 +0100 Subject: extcon: arizona: Stop microphone detection if we give up on it There should be no point in continuing to try to detect a microphone any more so stop doing so. Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/extcon/extcon-arizona.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/extcon') diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 0626754d6e04..427a289f32a5 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -196,6 +196,8 @@ static irqreturn_t arizona_micdet(int irq, void *data) if (info->jack_flips >= info->micd_num_modes) { dev_dbg(arizona->dev, "Detected headphone\n"); info->detecting = false; + arizona_stop_mic(info); + ret = extcon_set_cable_state_(&info->edev, ARIZONA_CABLE_HEADPHONE, true); -- cgit v1.2.3