diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
index bb6c03685193a0569bb1dd029d310bf5a11b74fa..3f66e35d6ecf4bcc2f9cf0a7f512de0df1791cba 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -977,7 +977,7 @@ free_tz:
 	return ERR_PTR(ret);
 }
 
-static inline void of_thermal_free_zone(struct __thermal_zone *tz)
+static __init void of_thermal_free_zone(struct __thermal_zone *tz)
 {
 	struct __thermal_bind_params *tbp;
 	int i, j;