From 1e2d8b213276d3f4bfd05cbf2b97b53160474561 Mon Sep 17 00:00:00 2001 From: Bhalchandra Gajare Date: Fri, 16 Sep 2016 18:55:28 -0700 Subject: [PATCH] ASoC: wcd-dsp-mgr: add argument to the interrupt handler callback Currently, when manager driver interrupt handler callback is called, there is no way for the caller to provide any data information along with the type of interrupt. Change adds argument to the interrupt handler so that callers can use this to pass agreed data when an interrupt occurs. Change-Id: I1c049227875a802491e21998c13c0bcd8eab7de6 Signed-off-by: Bhalchandra Gajare --- include/sound/wcd-dsp-mgr.h | 2 +- sound/soc/codecs/wcd-dsp-mgr.c | 2 +- sound/soc/codecs/wcd934x/wcd934x-dsp-cntl.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/sound/wcd-dsp-mgr.h b/include/sound/wcd-dsp-mgr.h index 5adcbcf660ba..39a763be26cf 100644 --- a/include/sound/wcd-dsp-mgr.h +++ b/include/sound/wcd-dsp-mgr.h @@ -109,7 +109,7 @@ struct wdsp_mgr_ops { struct device *(*get_dev_for_cmpnt)(struct device *wdsp_dev, enum wdsp_cmpnt_type type); int (*intr_handler)(struct device *wdsp_dev, - enum wdsp_intr intr); + enum wdsp_intr intr, void *arg); int (*vote_for_dsp)(struct device *wdsp_dev, bool vote); int (*suspend)(struct device *wdsp_dev); int (*resume)(struct device *wdsp_dev); diff --git a/sound/soc/codecs/wcd-dsp-mgr.c b/sound/soc/codecs/wcd-dsp-mgr.c index 69246ac9cc87..3dbeb669ce71 100644 --- a/sound/soc/codecs/wcd-dsp-mgr.c +++ b/sound/soc/codecs/wcd-dsp-mgr.c @@ -479,7 +479,7 @@ static struct device *wdsp_get_dev_for_cmpnt(struct device *wdsp_dev, } static int wdsp_intr_handler(struct device *wdsp_dev, - enum wdsp_intr intr) + enum wdsp_intr intr, void *arg) { struct wdsp_mgr_priv *wdsp; int ret; diff --git a/sound/soc/codecs/wcd934x/wcd934x-dsp-cntl.c b/sound/soc/codecs/wcd934x/wcd934x-dsp-cntl.c index 225b3a755f66..764503c22e35 100644 --- a/sound/soc/codecs/wcd934x/wcd934x-dsp-cntl.c +++ b/sound/soc/codecs/wcd934x/wcd934x-dsp-cntl.c @@ -553,7 +553,8 @@ static irqreturn_t wcd_cntl_ipc_irq(int irq, void *data) if (cntl->m_dev && cntl->m_ops && cntl->m_ops->intr_handler) - ret = cntl->m_ops->intr_handler(cntl->m_dev, WDSP_IPC1_INTR); + ret = cntl->m_ops->intr_handler(cntl->m_dev, WDSP_IPC1_INTR, + NULL); else ret = -EINVAL;