]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: add data field into snd_soc_jack_gpio
authorxiangxiao <xiaoxiang@xiaomi.com>
Sun, 23 Feb 2014 06:40:44 +0000 (14:40 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 24 Feb 2014 01:27:44 +0000 (10:27 +0900)
so callback could get the context data as needed

Signed-off-by: xiangxiao <xiaoxiang@xiaomi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
include/sound/soc.h
sound/soc/soc-jack.c

index 9a001472b96a4bf8a11c8c129543060fdb75c869..266c188cc36f42f0fc944ecd1d3bb9d904390acb 100644 (file)
@@ -600,7 +600,8 @@ struct snd_soc_jack_gpio {
        struct snd_soc_jack *jack;
        struct delayed_work work;
 
-       int (*jack_status_check)(void);
+       void *data;
+       int (*jack_status_check)(void *data);
 };
 
 struct snd_soc_jack {
index 23d43dac91da2c0d9c6ad8bbf792036483da3fab..720060286d199f29b2749b964c32d17a9584a34a 100644 (file)
@@ -250,7 +250,7 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
                report = 0;
 
        if (gpio->jack_status_check)
-               report = gpio->jack_status_check();
+               report = gpio->jack_status_check(gpio->data);
 
        snd_soc_jack_report(jack, report, gpio->report);
 }