Skip to content

Commit d09bc68

Browse files
committed
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()
2 parents 249f1ef + a54c518 commit d09bc68

File tree

4 files changed

+11
-17
lines changed

4 files changed

+11
-17
lines changed

drivers/thermal/broadcom/Kconfig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ config BCM2835_THERMAL
99
config BCM_NS_THERMAL
1010
tristate "Northstar thermal driver"
1111
depends on ARCH_BCM_IPROC || COMPILE_TEST
12+
default y if ARCH_BCM_IPROC
1213
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.
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.

drivers/thermal/qoriq_thermal.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ static struct thermal_zone_of_device_ops tmu_tz_ops = {
195195
static int qoriq_tmu_probe(struct platform_device *pdev)
196196
{
197197
int ret;
198-
const struct thermal_trip *trip;
199198
struct qoriq_tmu_data *data;
200199
struct device_node *np = pdev->dev.of_node;
201200
u32 site = 0;
@@ -243,8 +242,6 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
243242
goto err_tmu;
244243
}
245244

246-
trip = of_thermal_get_trip_points(data->tz);
247-
248245
/* Enable monitoring */
249246
site |= 0x1 << (15 - data->sensor_id);
250247
tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);

drivers/thermal/thermal_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ static DECLARE_DELAYED_WORK(thermal_emergency_poweroff_work,
359359
* This may be called from any critical situation to trigger a system shutdown
360360
* after a known period of time. By default this is not scheduled.
361361
*/
362-
void thermal_emergency_poweroff(void)
362+
static void thermal_emergency_poweroff(void)
363363
{
364364
int poweroff_delay_ms = CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS;
365365
/*

drivers/thermal/ti-soc-thermal/ti-bandgap.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id)
10101010
}
10111011

10121012
/**
1013-
* ti_bandgap_set_continous_mode() - One time enabling of continuous mode
1013+
* ti_bandgap_set_continuous_mode() - One time enabling of continuous mode
10141014
* @bgp: pointer to struct ti_bandgap
10151015
*
10161016
* 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)
12141214
}
12151215

12161216
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");
1217+
if (!bgp)
12191218
return ERR_PTR(-ENOMEM);
1220-
}
12211219

12221220
of_id = of_match_device(of_ti_bandgap_match, &pdev->dev);
12231221
if (of_id)
12241222
bgp->conf = of_id->data;
12251223

12261224
/* 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");
1225+
bgp->regval = devm_kcalloc(&pdev->dev, bgp->conf->sensor_count,
1226+
sizeof(*bgp->regval), GFP_KERNEL);
1227+
if (!bgp->regval)
12311228
return ERR_PTR(-ENOMEM);
1232-
}
12331229

12341230
i = 0;
12351231
do {

0 commit comments

Comments
 (0)