Skip to content

Commit 9272d2d

Browse files
dlezcanorafaeljw
authored andcommitted
thermal: Remove core header inclusion from drivers
As the name states "thermal_core.h" is the header file for the core components of the thermal framework. Too many drivers are including it. Hopefully the recent cleanups helped to self encapsulate the code a bit more and prevented the drivers to need this header. Remove this inclusion in every place where it is possible. Some other drivers did a confusion with the core header and the one exported in linux/thermal.h. They include the former instead of the latter. The changes also fix this. The tegra/soctherm driver still remains as it uses an internal function which need to be replaced. The Intel HFI driver uses the netlink internal framework core and should be changed to prevent to deal with the internals. No functional changes intended. Signed-off-by: Daniel Lezcano <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> # armada_thermal.c Reviewed-by: Kunihiko Hayashi <[email protected]> # uniphier_thermal.c Reviewed-by: Niklas Söderlund <[email protected]> # rcar_gen3_thermal.c Reviewed-by: Neil Armstrong <[email protected]> # amlogic_thermal.c Acked-by: Florian Fainelli <[email protected]> # bcm2835_thermal.c Acked-by: Thierry Reding <[email protected]> # tegra30-tsensor.c Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent ef1ab16 commit 9272d2d

14 files changed

+4
-18
lines changed

drivers/thermal/amlogic_thermal.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <linux/regmap.h>
2929
#include <linux/thermal.h>
3030

31-
#include "thermal_core.h"
3231
#include "thermal_hwmon.h"
3332

3433
#define TSENSOR_CFG_REG1 0x4

drivers/thermal/armada_thermal.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#include <linux/regmap.h>
2020
#include <linux/interrupt.h>
2121

22-
#include "thermal_core.h"
23-
2422
/* Thermal Manager Control and Status Register */
2523
#define PMU_TDC0_SW_RST_MASK (0x1 << 1)
2624
#define PMU_TM_DISABLE_OFFS 0

drivers/thermal/broadcom/bcm2835_thermal.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <linux/platform_device.h>
1919
#include <linux/thermal.h>
2020

21-
#include "../thermal_core.h"
2221
#include "../thermal_hwmon.h"
2322

2423
#define BCM2835_TS_TSENSCTL 0x00

drivers/thermal/hisi_thermal.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
#include <linux/platform_device.h>
1717
#include <linux/io.h>
1818
#include <linux/of_device.h>
19-
20-
#include "thermal_core.h"
19+
#include <linux/thermal.h>
2120

2221
#define HI6220_TEMP0_LAG (0x0)
2322
#define HI6220_TEMP0_TH (0x4)

drivers/thermal/imx8mm_thermal.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <linux/slab.h>
1818
#include <linux/thermal.h>
1919

20-
#include "thermal_core.h"
2120
#include "thermal_hwmon.h"
2221

2322
#define TER 0x0 /* TMU enable */

drivers/thermal/imx_sc_thermal.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/slab.h>
1414
#include <linux/thermal.h>
1515

16-
#include "thermal_core.h"
1716
#include "thermal_hwmon.h"
1817

1918
#define IMX_SC_MISC_FUNC_GET_TEMP 13

drivers/thermal/intel/intel_hfi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@
4040

4141
#include <asm/msr.h>
4242

43-
#include "../thermal_core.h"
4443
#include "intel_hfi.h"
4544
#include "thermal_interrupt.h"
4645

46+
#include "../thermal_netlink.h"
47+
4748
/* Hardware Feedback Interface MSR configuration bits */
4849
#define HW_FEEDBACK_PTR_VALID_BIT BIT(0)
4950
#define HW_FEEDBACK_CONFIG_HFI_ENABLE_BIT BIT(0)

drivers/thermal/qcom/qcom-spmi-temp-alarm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <linux/regmap.h>
1616
#include <linux/thermal.h>
1717

18-
#include "../thermal_core.h"
1918
#include "../thermal_hwmon.h"
2019

2120
#define QPNP_TM_REG_DIG_MAJOR 0x01

drivers/thermal/qoriq_thermal.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/thermal.h>
1414
#include <linux/units.h>
1515

16-
#include "thermal_core.h"
1716
#include "thermal_hwmon.h"
1817

1918
#define SITES_MAX 16

drivers/thermal/rcar_gen3_thermal.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <linux/sys_soc.h>
1818
#include <linux/thermal.h>
1919

20-
#include "thermal_core.h"
2120
#include "thermal_hwmon.h"
2221

2322
/* Register offsets */

0 commit comments

Comments
 (0)