summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-12-06 14:33:55 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-06 14:33:54 -0800
commite291dfcb9ad4cc9f2a845aa3c3c4335cf0ca5d51 (patch)
tree7562745b2caa9eb60b2f73fa277025a3ccd1794d /drivers
parent3dc6ea3f9009ebedc0dce12affa2ece2d9f9d816 (diff)
parent2e16e3b6d0aa328253f0ec518c4df83c401aeab5 (diff)
Merge "soc: qcom: implement notify_tx_abort() callback"
Diffstat (limited to 'drivers')
-rw-r--r--drivers/soc/qcom/wcd-dsp-glink.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/soc/qcom/wcd-dsp-glink.c b/drivers/soc/qcom/wcd-dsp-glink.c
index efd5945ea626..27e66dc5d204 100644
--- a/drivers/soc/qcom/wcd-dsp-glink.c
+++ b/drivers/soc/qcom/wcd-dsp-glink.c
@@ -185,6 +185,24 @@ static void wdsp_glink_notify_tx_done(void *handle, const void *priv,
}
/*
+ * wdsp_glink_notify_tx_abort - Glink notify tx abort callback to
+ * free tx buffer
+ * handle: Opaque Channel handle returned by GLink
+ * priv: Private pointer to the channel
+ * pkt_priv: Private pointer to the packet
+ */
+static void wdsp_glink_notify_tx_abort(void *handle, const void *priv,
+ const void *pkt_priv)
+{
+ if (!pkt_priv) {
+ pr_err("%s: Invalid parameter\n", __func__);
+ return;
+ }
+ /* Free tx pkt */
+ kfree(pkt_priv);
+}
+
+/*
* wdsp_glink_notify_rx_intent_req - Glink notify rx intent request callback
* to queue buffer to receive from remote client
* handle: Opaque channel handle returned by GLink
@@ -379,6 +397,7 @@ static int wdsp_glink_open_ch(struct wdsp_glink_ch *ch)
open_cfg.edge = WDSP_EDGE;
open_cfg.notify_rx = wdsp_glink_notify_rx;
open_cfg.notify_tx_done = wdsp_glink_notify_tx_done;
+ open_cfg.notify_tx_abort = wdsp_glink_notify_tx_abort;
open_cfg.notify_state = wdsp_glink_notify_state;
open_cfg.notify_rx_intent_req = wdsp_glink_notify_rx_intent_req;
open_cfg.priv = ch;