ignatenkobrain / rpms / kernel

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