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