Skip to content

Commit

Permalink
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/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()
  • Loading branch information
torvalds committed May 28, 2017
2 parents 249f1ef + a54c518 commit d09bc68
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
9 changes: 5 additions & 4 deletions drivers/thermal/broadcom/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ config BCM2835_THERMAL
config BCM_NS_THERMAL
tristate "Northstar thermal driver"
depends on ARCH_BCM_IPROC || COMPILE_TEST
default y if ARCH_BCM_IPROC
help
Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
with a thermal sensor that allows checking CPU temperature. This
driver provides support for it.
Support for the Northstar and Northstar Plus family of SoCs (e.g.
BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
Management Unit) block with a thermal sensor that allows checking CPU
temperature.
3 changes: 0 additions & 3 deletions drivers/thermal/qoriq_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ static struct thermal_zone_of_device_ops tmu_tz_ops = {
static int qoriq_tmu_probe(struct platform_device *pdev)
{
int ret;
const struct thermal_trip *trip;
struct qoriq_tmu_data *data;
struct device_node *np = pdev->dev.of_node;
u32 site = 0;
Expand Down Expand Up @@ -243,8 +242,6 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
goto err_tmu;
}

trip = of_thermal_get_trip_points(data->tz);

/* Enable monitoring */
site |= 0x1 << (15 - data->sensor_id);
tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
Expand Down
2 changes: 1 addition & 1 deletion drivers/thermal/thermal_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ static DECLARE_DELAYED_WORK(thermal_emergency_poweroff_work,
* This may be called from any critical situation to trigger a system shutdown
* after a known period of time. By default this is not scheduled.
*/
void thermal_emergency_poweroff(void)
static void thermal_emergency_poweroff(void)
{
int poweroff_delay_ms = CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS;
/*
Expand Down
14 changes: 5 additions & 9 deletions drivers/thermal/ti-soc-thermal/ti-bandgap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ ti_bandgap_force_single_read(struct ti_bandgap *bgp, int id)
}

/**
* ti_bandgap_set_continous_mode() - One time enabling of continuous mode
* ti_bandgap_set_continuous_mode() - One time enabling of continuous mode
* @bgp: pointer to struct ti_bandgap
*
* Call this function only if HAS(MODE_CONFIG) is set. As this driver may
Expand Down Expand Up @@ -1214,22 +1214,18 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
}

bgp = devm_kzalloc(&pdev->dev, sizeof(*bgp), GFP_KERNEL);
if (!bgp) {
dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
if (!bgp)
return ERR_PTR(-ENOMEM);
}

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

/* register shadow for context save and restore */
bgp->regval = devm_kzalloc(&pdev->dev, sizeof(*bgp->regval) *
bgp->conf->sensor_count, GFP_KERNEL);
if (!bgp->regval) {
dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
bgp->regval = devm_kcalloc(&pdev->dev, bgp->conf->sensor_count,
sizeof(*bgp->regval), GFP_KERNEL);
if (!bgp->regval)
return ERR_PTR(-ENOMEM);
}

i = 0;
do {
Expand Down

0 comments on commit d09bc68

Please sign in to comment.