diff options
author | NeilBrown <neilb@suse.de> | 2013-02-15 11:29:21 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-05-24 16:44:16 +1000 |
commit | 6567e168821e6e8860c2572c898ceb1f51370795 (patch) | |
tree | 326238fee799e19943069a7388c57cdf4a435bc8 /sound/soc/omap | |
parent | 938a5577a7c7c18010c8549fbb85ef3cf63877ca (diff) | |
download | kernel_goldelico_gta04-6567e168821e6e8860c2572c898ceb1f51370795.zip kernel_goldelico_gta04-6567e168821e6e8860c2572c898ceb1f51370795.tar.gz kernel_goldelico_gta04-6567e168821e6e8860c2572c898ceb1f51370795.tar.bz2 |
Jack bouncing: bugfix.
If get_madc_conversion returns an error, we should ignore the value.
Reported-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r-- | sound/soc/omap/gta04-audio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/omap/gta04-audio.c b/sound/soc/omap/gta04-audio.c index f49877c..83fb150 100644 --- a/sound/soc/omap/gta04-audio.c +++ b/sound/soc/omap/gta04-audio.c @@ -167,6 +167,8 @@ static void gta04_audio_jack_work(struct work_struct *work) delay = msecs_to_jiffies(50); val = twl4030_get_madc_conversion(7); + if (val < 0) + goto out; /* On my device: * open circuit = around 20 * short circuit = around 800 @@ -199,6 +201,7 @@ static void gta04_audio_jack_work(struct work_struct *work) snd_soc_jack_report(&jack.hs_jack, jackbits, SND_JACK_HEADSET | SND_JACK_BTN_0); +out: if (jack.open) schedule_delayed_work(&jack.jack_work, delay); } |