diff options
author | NeilBrown <neilb@suse.de> | 2013-01-08 09:49:12 +1100 |
---|---|---|
committer | H. Nikolaus Schaller <hns@goldelico.com> | 2013-07-22 17:40:36 +0200 |
commit | 5fe84cade0c43cc6cb19b19372206a80e837dfbc (patch) | |
tree | b1e667f74c81d6070acd3dab8411be7b70ce0c32 /sound/soc/omap | |
parent | d9805afc8e89f6576653731d5ef0729b5edc472e (diff) | |
download | kernel_goldelico_gta04-5fe84cade0c43cc6cb19b19372206a80e837dfbc.zip kernel_goldelico_gta04-5fe84cade0c43cc6cb19b19372206a80e837dfbc.tar.gz kernel_goldelico_gta04-5fe84cade0c43cc6cb19b19372206a80e837dfbc.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 cd96e5c..de8679a 100644 --- a/sound/soc/omap/gta04-audio.c +++ b/sound/soc/omap/gta04-audio.c @@ -166,6 +166,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 @@ -198,6 +200,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); } |