Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: add data field into snd_soc_jack_gpio
@ 2014-02-23  6:40 xiangxiao
  2014-02-24  1:28 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: xiangxiao @ 2014-02-23  6:40 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: alsa-devel, xiaoxiang

so callback could get the context data as needed

Change-Id: I5542613ccf9881deb672e71d0f0c4f603ad761fd
Signed-off-by: xiangxiao <xiaoxiang@xiaomi.com>
---
 include/sound/soc.h  | 3 ++-
 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 21038e0..a789a29 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -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 {
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index b12fce6..b903f82 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)
 		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);
 }
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: add data field into snd_soc_jack_gpio
  2014-02-23  6:40 [PATCH] ASoC: add data field into snd_soc_jack_gpio xiangxiao
@ 2014-02-24  1:28 ` Mark Brown
  2014-02-24  9:26   ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2014-02-24  1:28 UTC (permalink / raw)
  To: xiangxiao; +Cc: alsa-devel, lgirdwood


[-- Attachment #1.1: Type: text/plain, Size: 327 bytes --]

On Sun, Feb 23, 2014 at 02:40:44PM +0800, xiangxiao wrote:
> 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.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: add data field into snd_soc_jack_gpio
  2014-02-24  1:28 ` Mark Brown
@ 2014-02-24  9:26   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2014-02-24  9:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, lgirdwood, xiangxiao

At Mon, 24 Feb 2014 10:28:40 +0900,
Mark Brown wrote:
> 
> On Sun, Feb 23, 2014 at 02:40:44PM +0800, xiangxiao wrote:
> > 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-24  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-23  6:40 [PATCH] ASoC: add data field into snd_soc_jack_gpio xiangxiao
2014-02-24  1:28 ` Mark Brown
2014-02-24  9:26   ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox