All of lore.kernel.org
 help / color / mirror / Atom feed
From: xiangxiao <xiaoxiang@xiaomi.com>
To: xiaoxiang@xiaomi.com, broonie@kernel.org, lgirdwood@gmail.com
Cc: alsa-devel@alsa-project.org
Subject: [PATCH] ASoC: pass snd_soc_jack_gpio to jack_status_check callback
Date: Sun, 16 Feb 2014 13:36:12 +0800	[thread overview]
Message-ID: <1392528972-9440-1-git-send-email-xiaoxiang@xiaomi.com> (raw)

so the implementation could get the context data

Change-Id: I5542613ccf9881deb672e71d0f0c4f603ad761fd
Signed-off-by: xiangxiao <xiaoxiang@xiaomi.com>
---
 include/sound/soc.h  | 2 +-
 sound/soc/soc-jack.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 21038e0..e287462 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -613,7 +613,7 @@ struct snd_soc_jack_gpio {
 	struct snd_soc_jack *jack;
 	struct delayed_work work;
 
-	int (*jack_status_check)(void);
+	int (*jack_status_check)(struct snd_soc_jack_gpio *gpio);
 };
 
 struct snd_soc_jack {
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index b12fce6..6028af5 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);
 
 	snd_soc_jack_report(jack, report, gpio->report);
 }
-- 
1.8.1.2

             reply	other threads:[~2014-02-16  5:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-16  5:36 xiangxiao [this message]
2014-02-18  1:16 ` [PATCH] ASoC: pass snd_soc_jack_gpio to jack_status_check callback Mark Brown
     [not found]   ` <C5331076FE79984AAD7207DE353CEA4E40858C60@ex-mbox1.xiaomi.net>
2014-02-22  3:21     ` 答复: " Mark Brown
2014-02-23  6:04       ` 答复: " 肖翔

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392528972-9440-1-git-send-email-xiaoxiang@xiaomi.com \
    --to=xiaoxiang@xiaomi.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.