Skip to contentSkip to conversation

ASoC: add data field into snd_soc_jack_gpio

PATCH Applied xiangxiao 3 participants 3 messages Feb 23, 2014 – Feb 24, 2014

Subsystems (2)
lore
Share & tools
lore

xiangxiao

author
#0 lore raw

PATCH 1/1 ASoC: add data field into snd_soc_jack_gpio

so callback could get the context data as needed

Change-Id I5542613ccf9881deb672e71d0f0c4f603ad761fd
---
 include/sound/soc.h  | 3 ++-
 sound/soc/soc-jack.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
include/sound/soc.h +2 -1
index 21038e0..a789a29 100644
@@ -613,7 +613,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 {
sound/soc/soc-jack.c +1 -1
index b12fce6..b903f82 100644
@@ -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);
 }
Signature · 1 line
1.8.1.2
maintainer Applied
#1 lore raw
Quoted 3 lines · xiangxiao

so callback could get the context data as needed

Change-Id: I5542613ccf9881deb672e71d0f0c4f603ad761fd

Applied, thanks, but as I said for your previous version of this upstream submissions shouldn't have Change-Id, that is to do with your internal review system.

#2 lore raw

At Mon, 24 Feb 2014 10:28:40 +0900,

Quoted 9 lines · Mark Brown
Quoted 3 lines · xiangxiao

so callback could get the context data as needed

Change-Id: I5542613ccf9881deb672e71d0f0c4f603ad761fd

Applied, thanks, but as I said for your previous version of this upstream submissions shouldn't have Change-Id, that is to do with your internal review system.

Yep, also please write your name in sign-off line in a standard way at the next time, too (usually either "Firstname Surname <mail>").

Takashi