diff options
-rw-r--r-- | drivers/thermal/broadcom/Kconfig | 9 | ||||
-rw-r--r-- | drivers/thermal/qoriq_thermal.c | 3 | ||||
-rw-r--r-- | drivers/thermal/thermal_core.c | 2 | ||||
-rw-r--r-- | drivers/thermal/ti-soc-thermal/ti-bandgap.c | 14 |
4 files changed, 11 insertions, 17 deletions
diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig index ab08af4654ef..42c098e86f84 100644 --- a/drivers/thermal/broadcom/Kconfig +++ b/drivers/thermal/broadcom/Kconfig | |||
@@ -9,8 +9,9 @@ config BCM2835_THERMAL | |||
9 | config BCM_NS_THERMAL | 9 | config BCM_NS_THERMAL |
10 | tristate "Northstar thermal driver" | 10 | tristate "Northstar thermal driver" |
11 | depends on ARCH_BCM_IPROC || COMPILE_TEST | 11 | depends on ARCH_BCM_IPROC || COMPILE_TEST |
12 | default y if ARCH_BCM_IPROC | ||
12 | help | 13 | help |
13 | Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081, | 14 | Support for the Northstar and Northstar Plus family of SoCs (e.g. |
14 | BCM4709 and BCM47094. It contains DMU (Device Management Unit) block | 15 | BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device |
15 | with a thermal sensor that allows checking CPU temperature. This | 16 | Management Unit) block with a thermal sensor that allows checking CPU |
16 | driver provides support for it. | 17 | temperature. |
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c index 644ba526d9ea..4362a69ac88d 100644 --- a/drivers/thermal/qoriq_thermal.c +++ b/drivers/thermal/qoriq_thermal.c | |||
@@ -195,7 +195,6 @@ static struct thermal_zone_of_device_ops tmu_tz_ops = { | |||
195 | static int qoriq_tmu_probe(struct platform_device *pdev) | 195 | static int qoriq_tmu_probe(struct platform_device *pdev) |
196 | { | 196 | { |
197 | int ret; | 197 | int ret; |
198 | const struct thermal_trip *trip; | ||
199 | struct qoriq_tmu_data *data; | 198 | struct qoriq_tmu_data *data; |
200 | struct device_node *np = pdev->dev.of_node; | 199 | struct device_node *np = pdev->dev.of_node; |
201 | u32 site = 0; | 200 | u32 site = 0; |
@@ -243,8 +242,6 @@ static int qoriq_tmu_probe(struct platform_device *pdev) | |||
243 | goto err_tmu; | 242 | goto err_tmu; |
244 | } | 243 | } |
245 | 244 | ||
246 | trip = of_thermal_get_trip_points(data->tz); | ||
247 | |||
248 | /* Enable monitoring */ | 245 | /* Enable monitoring */ |
249 | site |= 0x1 << (15 - data->sensor_id); | 246 | site |= 0x1 << (15 - data->sensor_id); |
250 | tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr); | 247 | tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr); |
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index b21b9cc2c8d6..5a51c740e372 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c | |||
@@ -359,7 +359,7 @@ static DECLARE_DELAYED_WORK(thermal_emergency_poweroff_work, | |||
359 | * This may be called from any critical situation to trigger a system shutdown | 359 | * This may be called from any critical situation to trigger a system shutdown |
360 | * after a known period of time. By default this is not scheduled. | 360 | * after a known period of time. By default this is not scheduled. |
361 | */ | 361 | */ |
362 | void thermal_emergency_poweroff(void) | 362 | static void thermal_emergency_poweroff(void) |
363 | { | 363 | { |
364 | int poweroff_delay_ms = CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS; | 364 | int poweroff_delay_ms = CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS; |
365 | /* | 365 | /* |
diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c index ba9c302454fb..696ab3046b87 100644 --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c | |||
@@ -1010,7 +1010,7 @@ ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id) | |||
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | /** | 1012 | /** |
1013 | * ti_bandgap_set_continous_mode() - One time enabling of continuous mode | 1013 | * ti_bandgap_set_continuous_mode() - One time enabling of continuous mode |
1014 | * @bgp: pointer to struct ti_bandgap | 1014 | * @bgp: pointer to struct ti_bandgap |
1015 | * | 1015 | * |
1016 | * Call this function only if HAS(MODE_CONFIG) is set. As this driver may | 1016 | * Call this function only if HAS(MODE_CONFIG) is set. As this driver may |
@@ -1214,22 +1214,18 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev) | |||
1214 | } | 1214 | } |
1215 | 1215 | ||
1216 | bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL); | 1216 | bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL); |
1217 | if (!bgp) { | 1217 | if (!bgp) |
1218 | dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n"); | ||
1219 | return ERR_PTR(-ENOMEM); | 1218 | return ERR_PTR(-ENOMEM); |
1220 | } | ||
1221 | 1219 | ||
1222 | of_id = of_match_device(of_ti_bandgap_match, &pdev->dev); | 1220 | of_id = of_match_device(of_ti_bandgap_match, &pdev->dev); |
1223 | if (of_id) | 1221 | if (of_id) |
1224 | bgp->conf = of_id->data; | 1222 | bgp->conf = of_id->data; |
1225 | 1223 | ||
1226 | /* register shadow for context save and restore */ | 1224 | /* register shadow for context save and restore */ |
1227 | bgp->regval = devm_kzalloc(&pdev->dev, sizeof(*bgp->regval) * | 1225 | bgp->regval = devm_kcalloc(&pdev->dev, bgp->conf->sensor_count, |
1228 | bgp->conf->sensor_count, GFP_KERNEL); | 1226 | sizeof(*bgp->regval), GFP_KERNEL); |
1229 | if (!bgp->regval) { | 1227 | if (!bgp->regval) |
1230 | dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n"); | ||
1231 | return ERR_PTR(-ENOMEM); | 1228 | return ERR_PTR(-ENOMEM); |
1232 | } | ||
1233 | 1229 | ||
1234 | i = 0; | 1230 | i = 0; |
1235 | do { | 1231 | do { |