Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal

Pull thermal SoC management fixes from Eduardo Valentin:

- fixes to TI SoC driver, Broadcom, qoriq

- small sparse warning fix on thermal core

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
thermal: broadcom: ns-thermal: default on iProc SoCs
ti-soc-thermal: Fix a typo in a comment line
ti-soc-thermal: Delete error messages for failed memory allocations in ti_bandgap_build()
ti-soc-thermal: Use devm_kcalloc() in ti_bandgap_build()
thermal: core: make thermal_emergency_poweroff static
thermal: qoriq: remove useless call for of_thermal_get_trip_points()

+11 -17
+5 -4
drivers/thermal/broadcom/Kconfig
··· 9 config BCM_NS_THERMAL 10 tristate "Northstar thermal driver" 11 depends on ARCH_BCM_IPROC || COMPILE_TEST 12 help 13 - Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081, 14 - BCM4709 and BCM47094. It contains DMU (Device Management Unit) block 15 - with a thermal sensor that allows checking CPU temperature. This 16 - driver provides support for it.
··· 9 config BCM_NS_THERMAL 10 tristate "Northstar thermal driver" 11 depends on ARCH_BCM_IPROC || COMPILE_TEST 12 + default y if ARCH_BCM_IPROC 13 help 14 + Support for the Northstar and Northstar Plus family of SoCs (e.g. 15 + BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device 16 + Management Unit) block with a thermal sensor that allows checking CPU 17 + temperature.
-3
drivers/thermal/qoriq_thermal.c
··· 195 static int qoriq_tmu_probe(struct platform_device *pdev) 196 { 197 int ret; 198 - const struct thermal_trip *trip; 199 struct qoriq_tmu_data *data; 200 struct device_node *np = pdev->dev.of_node; 201 u32 site = 0; ··· 241 "Failed to register thermal zone device %d\n", ret); 242 goto err_tmu; 243 } 244 - 245 - trip = of_thermal_get_trip_points(data->tz); 246 247 /* Enable monitoring */ 248 site |= 0x1 << (15 - data->sensor_id);
··· 195 static int qoriq_tmu_probe(struct platform_device *pdev) 196 { 197 int ret; 198 struct qoriq_tmu_data *data; 199 struct device_node *np = pdev->dev.of_node; 200 u32 site = 0; ··· 242 "Failed to register thermal zone device %d\n", ret); 243 goto err_tmu; 244 } 245 246 /* Enable monitoring */ 247 site |= 0x1 << (15 - data->sensor_id);
+1 -1
drivers/thermal/thermal_core.c
··· 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. 361 */ 362 - void thermal_emergency_poweroff(void) 363 { 364 int poweroff_delay_ms = CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS; 365 /*
··· 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. 361 */ 362 + static void thermal_emergency_poweroff(void) 363 { 364 int poweroff_delay_ms = CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS; 365 /*
+5 -9
drivers/thermal/ti-soc-thermal/ti-bandgap.c
··· 1010 } 1011 1012 /** 1013 - * ti_bandgap_set_continous_mode() - One time enabling of continuous mode 1014 * @bgp: pointer to struct ti_bandgap 1015 * 1016 * Call this function only if HAS(MODE_CONFIG) is set. As this driver may ··· 1214 } 1215 1216 bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL); 1217 - if (!bgp) { 1218 - dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n"); 1219 return ERR_PTR(-ENOMEM); 1220 - } 1221 1222 of_id = of_match_device(of_ti_bandgap_match, &pdev->dev); 1223 if (of_id) 1224 bgp->conf = of_id->data; 1225 1226 /* register shadow for context save and restore */ 1227 - bgp->regval = devm_kzalloc(&pdev->dev, sizeof(*bgp->regval) * 1228 - bgp->conf->sensor_count, GFP_KERNEL); 1229 - if (!bgp->regval) { 1230 - dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n"); 1231 return ERR_PTR(-ENOMEM); 1232 - } 1233 1234 i = 0; 1235 do {
··· 1010 } 1011 1012 /** 1013 + * ti_bandgap_set_continuous_mode() - One time enabling of continuous mode 1014 * @bgp: pointer to struct ti_bandgap 1015 * 1016 * Call this function only if HAS(MODE_CONFIG) is set. As this driver may ··· 1214 } 1215 1216 bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL); 1217 + if (!bgp) 1218 return ERR_PTR(-ENOMEM); 1219 1220 of_id = of_match_device(of_ti_bandgap_match, &pdev->dev); 1221 if (of_id) 1222 bgp->conf = of_id->data; 1223 1224 /* register shadow for context save and restore */ 1225 + bgp->regval = devm_kcalloc(&pdev->dev, bgp->conf->sensor_count, 1226 + sizeof(*bgp->regval), GFP_KERNEL); 1227 + if (!bgp->regval) 1228 return ERR_PTR(-ENOMEM); 1229 1230 i = 0; 1231 do {