From patchwork Sun Feb 16 05:36:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiang Xiao X-Patchwork-Id: 3657971 X-Patchwork-Delegate: broonie@sirena.org.uk Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 263FEBF13A for ; Sun, 16 Feb 2014 10:51:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5663C201DD for ; Sun, 16 Feb 2014 10:51:50 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C562C20163 for ; Sun, 16 Feb 2014 10:51:48 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CF8B9261A84; Sun, 16 Feb 2014 11:51:47 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 192B3261600; Sun, 16 Feb 2014 11:50:47 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 10AF026171F; Sun, 16 Feb 2014 06:37:14 +0100 (CET) Received: from mx1.mxmail.xiaomi.com (mx1.mxmail.xiaomi.com [58.68.235.87]) by alsa0.perex.cz (Postfix) with ESMTP id B8B6C2615FA for ; Sun, 16 Feb 2014 06:37:06 +0100 (CET) Received: from mail.xiaomi.com (unknown [114.255.3.134]) by mx1.mxmail.xiaomi.com (Postfix) with ESMTP id 2634481243; Sun, 16 Feb 2014 13:36:53 +0800 (CST) Received: from xiaoxiang-desktop.mioffice.cn (10.237.130.10) by EX-CAS2.xiaomi.net (10.237.8.100) with Microsoft SMTP Server (TLS) id 14.3.174.1; Sun, 16 Feb 2014 13:36:55 +0800 From: xiangxiao To: , , Date: Sun, 16 Feb 2014 13:36:12 +0800 Message-ID: <1392528972-9440-1-git-send-email-xiaoxiang@xiaomi.com> X-Mailer: git-send-email 1.8.1.2 MIME-Version: 1.0 X-Originating-IP: [10.237.130.10] X-EsetResult: clean, is OK X-EsetId: E374883E57221E38B139D9 X-Mailman-Approved-At: Sun, 16 Feb 2014 11:50:44 +0100 Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH] ASoC: pass snd_soc_jack_gpio to jack_status_check callback X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP so the implementation could get the context data Change-Id: I5542613ccf9881deb672e71d0f0c4f603ad761fd Signed-off-by: xiangxiao --- 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); }