diff options
author | xiangxiao <xiaoxiang@xiaomi.com> | 2014-02-23 01:40:44 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-23 20:27:44 -0500 |
commit | cb29d7b9ef7faf95e27d90362a5e7694c5479093 (patch) | |
tree | fe51f47d477c2a723392a7e5a0e041dc9853516e | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
ASoC: add data field into snd_soc_jack_gpio
so callback could get the context data as needed
Signed-off-by: xiangxiao <xiaoxiang@xiaomi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | include/sound/soc.h | 3 | ||||
-rw-r--r-- | sound/soc/soc-jack.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 9a001472b96a..266c188cc36f 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -600,7 +600,8 @@ struct snd_soc_jack_gpio { | |||
600 | struct snd_soc_jack *jack; | 600 | struct snd_soc_jack *jack; |
601 | struct delayed_work work; | 601 | struct delayed_work work; |
602 | 602 | ||
603 | int (*jack_status_check)(void); | 603 | void *data; |
604 | int (*jack_status_check)(void *data); | ||
604 | }; | 605 | }; |
605 | 606 | ||
606 | struct snd_soc_jack { | 607 | struct snd_soc_jack { |
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 23d43dac91da..720060286d19 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c | |||
@@ -250,7 +250,7 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio) | |||
250 | report = 0; | 250 | report = 0; |
251 | 251 | ||
252 | if (gpio->jack_status_check) | 252 | if (gpio->jack_status_check) |
253 | report = gpio->jack_status_check(); | 253 | report = gpio->jack_status_check(gpio->data); |
254 | 254 | ||
255 | snd_soc_jack_report(jack, report, gpio->report); | 255 | snd_soc_jack_report(jack, report, gpio->report); |
256 | } | 256 | } |