fanghuilin / rpms / kernel

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