aa18062
From 40cb129048e5d2456da8d9d6468f292da3071b91 Mon Sep 17 00:00:00 2001
aa18062
From: Rob Clark <robdclark@gmail.com>
aa18062
Date: Fri, 30 Jun 2017 16:40:23 -0400
aa18062
Subject: [PATCH 4/6] thermal: qcom: tsens: fix crash due to incorrect __init
aa18062
aa18062
init_common() is called from probe, which can happen after the __init
aa18062
section is already unloaded in the case of -EPROBE_DEFER.  Causing a
aa18062
later probe to attempt to branch to hyperspace.
aa18062
aa18062
Cc: <stable@vger.kernel.org>
aa18062
Signed-off-by: Rob Clark <robdclark@gmail.com>
aa18062
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
aa18062
---
aa18062
 drivers/thermal/qcom/tsens-common.c | 2 +-
aa18062
 1 file changed, 1 insertion(+), 1 deletion(-)
aa18062
aa18062
diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c
aa18062
index b1449ad67fc0..22ad37c9808c 100644
aa18062
--- a/drivers/thermal/qcom/tsens-common.c
aa18062
+++ b/drivers/thermal/qcom/tsens-common.c
aa18062
@@ -123,7 +123,7 @@ static const struct regmap_config tsens_config = {
aa18062
 	.reg_stride	= 4,
aa18062
 };
aa18062
 
aa18062
-int __init init_common(struct tsens_device *tmdev)
aa18062
+int init_common(struct tsens_device *tmdev)
aa18062
 {
aa18062
 	void __iomem *base;
aa18062
 
aa18062
-- 
aa18062
2.13.0