summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorBhalchandra Gajare <gajare@codeaurora.org>2016-10-10 17:16:29 -0700
committerBhalchandra Gajare <gajare@codeaurora.org>2016-10-11 15:35:40 -0700
commitd0b17cbf01350723aec31d4dcaa203f6955b21d0 (patch)
tree54255bd74d8e44178fc72979f60fa2e021b98046 /sound
parent93b43a172c65188fad17b3f46fa4014f285ca4ef (diff)
ASoC: wcd-dsp-mgr: rename wdsp_intr_handler to wdsp_signal_handler
The wdsp_intr_handler is not really processing interrupts in interrupt context, rather assumes that the caller is not in interrupt context and performs calls that may sleep. Rename the function in order to avoid confusion. Interrupt handlers can still call this function as long as they are in threaded interrupt context and are okay to sleep. Change-Id: Ia2803d6ca021d505ed2e711e676cbd701b11c492 Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wcd-dsp-mgr.c20
-rw-r--r--sound/soc/codecs/wcd934x/wcd934x-dsp-cntl.c16
2 files changed, 18 insertions, 18 deletions
diff --git a/sound/soc/codecs/wcd-dsp-mgr.c b/sound/soc/codecs/wcd-dsp-mgr.c
index ee8b27dbec64..a780edc6375b 100644
--- a/sound/soc/codecs/wcd-dsp-mgr.c
+++ b/sound/soc/codecs/wcd-dsp-mgr.c
@@ -136,7 +136,7 @@ struct wdsp_ramdump_data {
void *rd_v_addr;
/* Data provided through error interrupt */
- struct wdsp_err_intr_arg err_data;
+ struct wdsp_err_signal_arg err_data;
};
struct wdsp_mgr_priv {
@@ -608,7 +608,7 @@ static struct device *wdsp_get_dev_for_cmpnt(struct device *wdsp_dev,
static void wdsp_collect_ramdumps(struct wdsp_mgr_priv *wdsp)
{
struct wdsp_img_section img_section;
- struct wdsp_err_intr_arg *data = &wdsp->dump_data.err_data;
+ struct wdsp_err_signal_arg *data = &wdsp->dump_data.err_data;
struct ramdump_segment rd_seg;
int ret = 0;
@@ -739,7 +739,7 @@ static int wdsp_ssr_handler(struct wdsp_mgr_priv *wdsp, void *arg,
enum wdsp_ssr_type ssr_type)
{
enum wdsp_ssr_type current_ssr_type;
- struct wdsp_err_intr_arg *err_data;
+ struct wdsp_err_signal_arg *err_data;
WDSP_MGR_MUTEX_LOCK(wdsp, wdsp->ssr_mutex);
@@ -750,7 +750,7 @@ static int wdsp_ssr_handler(struct wdsp_mgr_priv *wdsp, void *arg,
wdsp->ssr_type = ssr_type;
if (arg) {
- err_data = (struct wdsp_err_intr_arg *) arg;
+ err_data = (struct wdsp_err_signal_arg *) arg;
memcpy(&wdsp->dump_data.err_data, err_data,
sizeof(*err_data));
} else {
@@ -787,8 +787,8 @@ static int wdsp_ssr_handler(struct wdsp_mgr_priv *wdsp, void *arg,
return 0;
}
-static int wdsp_intr_handler(struct device *wdsp_dev,
- enum wdsp_intr intr, void *arg)
+static int wdsp_signal_handler(struct device *wdsp_dev,
+ enum wdsp_signal signal, void *arg)
{
struct wdsp_mgr_priv *wdsp;
int ret;
@@ -799,7 +799,7 @@ static int wdsp_intr_handler(struct device *wdsp_dev,
wdsp = dev_get_drvdata(wdsp_dev);
WDSP_MGR_MUTEX_LOCK(wdsp, wdsp->api_mutex);
- switch (intr) {
+ switch (signal) {
case WDSP_IPC1_INTR:
ret = wdsp_unicast_event(wdsp, WDSP_CMPNT_IPC,
WDSP_EVENT_IPC1_INTR, NULL);
@@ -813,8 +813,8 @@ static int wdsp_intr_handler(struct device *wdsp_dev,
}
if (IS_ERR_VALUE(ret))
- WDSP_ERR(wdsp, "handling intr %d failed with error %d",
- intr, ret);
+ WDSP_ERR(wdsp, "handling signal %d failed with error %d",
+ signal, ret);
WDSP_MGR_MUTEX_UNLOCK(wdsp, wdsp->api_mutex);
return ret;
@@ -870,7 +870,7 @@ static int wdsp_resume(struct device *wdsp_dev)
static struct wdsp_mgr_ops wdsp_ops = {
.register_cmpnt_ops = wdsp_register_cmpnt_ops,
.get_dev_for_cmpnt = wdsp_get_dev_for_cmpnt,
- .intr_handler = wdsp_intr_handler,
+ .signal_handler = wdsp_signal_handler,
.vote_for_dsp = wdsp_vote_for_dsp,
.suspend = wdsp_suspend,
.resume = wdsp_resume,
diff --git a/sound/soc/codecs/wcd934x/wcd934x-dsp-cntl.c b/sound/soc/codecs/wcd934x/wcd934x-dsp-cntl.c
index e649770297f1..c3758620177d 100644
--- a/sound/soc/codecs/wcd934x/wcd934x-dsp-cntl.c
+++ b/sound/soc/codecs/wcd934x/wcd934x-dsp-cntl.c
@@ -646,9 +646,9 @@ static irqreturn_t wcd_cntl_ipc_irq(int irq, void *data)
complete(&cntl->boot_complete);
if (cntl->m_dev && cntl->m_ops &&
- cntl->m_ops->intr_handler)
- ret = cntl->m_ops->intr_handler(cntl->m_dev, WDSP_IPC1_INTR,
- NULL);
+ cntl->m_ops->signal_handler)
+ ret = cntl->m_ops->signal_handler(cntl->m_dev, WDSP_IPC1_INTR,
+ NULL);
else
ret = -EINVAL;
@@ -663,7 +663,7 @@ static irqreturn_t wcd_cntl_err_irq(int irq, void *data)
{
struct wcd_dsp_cntl *cntl = data;
struct snd_soc_codec *codec = cntl->codec;
- struct wdsp_err_intr_arg arg;
+ struct wdsp_err_signal_arg arg;
u16 status = 0;
u8 reg_val;
int ret = 0;
@@ -678,19 +678,19 @@ static irqreturn_t wcd_cntl_err_irq(int irq, void *data)
__func__, status);
if ((status & cntl->irqs.fatal_irqs) &&
- (cntl->m_dev && cntl->m_ops && cntl->m_ops->intr_handler)) {
+ (cntl->m_dev && cntl->m_ops && cntl->m_ops->signal_handler)) {
arg.mem_dumps_enabled = cntl->ramdump_enable;
arg.remote_start_addr = WCD_934X_RAMDUMP_START_ADDR;
arg.dump_size = WCD_934X_RAMDUMP_SIZE;
- ret = cntl->m_ops->intr_handler(cntl->m_dev, WDSP_ERR_INTR,
- &arg);
+ ret = cntl->m_ops->signal_handler(cntl->m_dev, WDSP_ERR_INTR,
+ &arg);
if (IS_ERR_VALUE(ret))
dev_err(cntl->codec->dev,
"%s: Failed to handle fatal irq 0x%x\n",
__func__, status & cntl->irqs.fatal_irqs);
wcd_cntl_change_online_state(cntl, 0);
} else {
- dev_err(cntl->codec->dev, "%s: Invalid intr_handler\n",
+ dev_err(cntl->codec->dev, "%s: Invalid signal_handler\n",
__func__);
}