Skip to content

Commit 3f16503

Browse files
committed
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal
Pull thermal fixes from Eduardo Valentin: "Minor fixes to OF thermal, qoriq, and rcar drivers" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: thermal: of-thermal: disable passive polling when thermal zone is disabled thermal: rcar_gen3_thermal: convert to SPDX identifiers thermal: rcar_thermal: convert to SPDX identifiers thermal: qoriq: Switch to SPDX identifier thermal: qoriq: Simplify the 'site' variable assignment thermal: qoriq: Use devm_thermal_zone_of_sensor_register()
2 parents 050cdc6 + 152395f commit 3f16503

File tree

4 files changed

+16
-45
lines changed

4 files changed

+16
-45
lines changed

drivers/thermal/of-thermal.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,13 @@ static int of_thermal_set_mode(struct thermal_zone_device *tz,
260260

261261
mutex_lock(&tz->lock);
262262

263-
if (mode == THERMAL_DEVICE_ENABLED)
263+
if (mode == THERMAL_DEVICE_ENABLED) {
264264
tz->polling_delay = data->polling_delay;
265-
else
265+
tz->passive_delay = data->passive_delay;
266+
} else {
266267
tz->polling_delay = 0;
268+
tz->passive_delay = 0;
269+
}
267270

268271
mutex_unlock(&tz->lock);
269272

drivers/thermal/qoriq_thermal.c

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
/*
2-
* Copyright 2016 Freescale Semiconductor, Inc.
3-
*
4-
* This program is free software; you can redistribute it and/or modify it
5-
* under the terms and conditions of the GNU General Public License,
6-
* version 2, as published by the Free Software Foundation.
7-
*
8-
* This program is distributed in the hope it will be useful, but WITHOUT
9-
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10-
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11-
* more details.
12-
*
13-
*/
1+
// SPDX-License-Identifier: GPL-2.0
2+
//
3+
// Copyright 2016 Freescale Semiconductor, Inc.
144

155
#include <linux/module.h>
166
#include <linux/platform_device.h>
@@ -197,7 +187,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
197187
int ret;
198188
struct qoriq_tmu_data *data;
199189
struct device_node *np = pdev->dev.of_node;
200-
u32 site = 0;
190+
u32 site;
201191

202192
if (!np) {
203193
dev_err(&pdev->dev, "Device OF-Node is NULL");
@@ -233,8 +223,9 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
233223
if (ret < 0)
234224
goto err_tmu;
235225

236-
data->tz = thermal_zone_of_sensor_register(&pdev->dev, data->sensor_id,
237-
data, &tmu_tz_ops);
226+
data->tz = devm_thermal_zone_of_sensor_register(&pdev->dev,
227+
data->sensor_id,
228+
data, &tmu_tz_ops);
238229
if (IS_ERR(data->tz)) {
239230
ret = PTR_ERR(data->tz);
240231
dev_err(&pdev->dev,
@@ -243,7 +234,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
243234
}
244235

245236
/* Enable monitoring */
246-
site |= 0x1 << (15 - data->sensor_id);
237+
site = 0x1 << (15 - data->sensor_id);
247238
tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
248239

249240
return 0;
@@ -261,8 +252,6 @@ static int qoriq_tmu_remove(struct platform_device *pdev)
261252
{
262253
struct qoriq_tmu_data *data = platform_get_drvdata(pdev);
263254

264-
thermal_zone_of_sensor_unregister(&pdev->dev, data->tz);
265-
266255
/* Disable monitoring */
267256
tmu_write(data, TMR_DISABLE, &data->regs->tmr);
268257

drivers/thermal/rcar_gen3_thermal.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1+
// SPDX-License-Identifier: GPL-2.0
12
/*
23
* R-Car Gen3 THS thermal sensor driver
34
* Based on rcar_thermal.c and work from Hien Dang and Khiem Nguyen.
45
*
56
* Copyright (C) 2016 Renesas Electronics Corporation.
67
* Copyright (C) 2016 Sang Engineering
7-
*
8-
* This program is free software; you can redistribute it and/or modify
9-
* it under the terms of the GNU General Public License as published by
10-
* the Free Software Foundation; version 2 of the License.
11-
*
12-
* This program is distributed in the hope that it will be useful, but
13-
* WITHOUT ANY WARRANTY; without even the implied warranty of
14-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15-
* General Public License for more details.
16-
*
178
*/
189
#include <linux/delay.h>
1910
#include <linux/err.h>

drivers/thermal/rcar_thermal.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
1+
// SPDX-License-Identifier: GPL-2.0
12
/*
23
* R-Car THS/TSC thermal sensor driver
34
*
45
* Copyright (C) 2012 Renesas Solutions Corp.
56
* Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6-
*
7-
* This program is free software; you can redistribute it and/or modify
8-
* it under the terms of the GNU General Public License as published by
9-
* the Free Software Foundation; version 2 of the License.
10-
*
11-
* This program is distributed in the hope that it will be useful, but
12-
* WITHOUT ANY WARRANTY; without even the implied warranty of
13-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14-
* General Public License for more details.
15-
*
16-
* You should have received a copy of the GNU General Public License along
17-
* with this program; if not, write to the Free Software Foundation, Inc.,
18-
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
197
*/
208
#include <linux/delay.h>
219
#include <linux/err.h>
@@ -660,6 +648,6 @@ static struct platform_driver rcar_thermal_driver = {
660648
};
661649
module_platform_driver(rcar_thermal_driver);
662650

663-
MODULE_LICENSE("GPL");
651+
MODULE_LICENSE("GPL v2");
664652
MODULE_DESCRIPTION("R-Car THS/TSC thermal sensor driver");
665653
MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");

0 commit comments

Comments
 (0)