summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunmin Wang <runminw@codeaurora.org>2016-09-06 16:07:30 -0700
committerRunmin Wang <runminw@codeaurora.org>2016-09-08 16:49:41 -0700
commite7549a9c25eed8fcb5735a40e289b35fa38c4ac8 (patch)
treeff27f1d59712b031fa89b4688de0084a58961a06
parent11d6060fffff4b7e87d1cadb5f65dfc7f74332cc (diff)
soc: qcom: irq-helper: Add comments to exposed APIs
Add comments and might_sleep() to warn that irq_blacklist_on/off APIs should not be called in atomic context. CRs-Fixed: 1063719 Change-Id: Ie6858243a666aeb21cc486208b9dd8221e9ad674 Signed-off-by: Runmin Wang <runminw@codeaurora.org>
-rw-r--r--drivers/soc/qcom/irq-helper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/soc/qcom/irq-helper.c b/drivers/soc/qcom/irq-helper.c
index 7bb371f7991e..370801291230 100644
--- a/drivers/soc/qcom/irq-helper.c
+++ b/drivers/soc/qcom/irq-helper.c
@@ -78,10 +78,12 @@ IRQ_HELPER_ATTR(irq_blacklist_on, 0444, show_deploy, NULL);
static struct irq_helper *irq_h;
+/* Do not call this API in an atomic context */
int irq_blacklist_on(void)
{
bool flag = false;
+ might_sleep();
if (!irq_h) {
pr_err("%s: init function is not called", __func__);
return -EPERM;
@@ -103,10 +105,12 @@ int irq_blacklist_on(void)
}
EXPORT_SYMBOL(irq_blacklist_on);
+/* Do not call this API in an atomic context */
int irq_blacklist_off(void)
{
bool flag = false;
+ might_sleep();
if (!irq_h) {
pr_err("%s: init function is not called", __func__);
return -EPERM;