Skip to content

Commit 3f5b995

Browse files
xdarklightdlezcano
authored andcommitted
thermal: devfreq_cooling: inline all stubs for CONFIG_DEVFREQ_THERMAL=n
When CONFIG_DEVFREQ_THERMAL is disabled all functions except of_devfreq_cooling_register_power() were already inlined. Also inline the last function to avoid compile errors when multiple drivers call of_devfreq_cooling_register_power() when CONFIG_DEVFREQ_THERMAL is not set. Compilation failed with the following message: multiple definition of `of_devfreq_cooling_register_power' (which then lists all usages of of_devfreq_cooling_register_power()) Thomas Zimmermann reported this problem [0] on a kernel config with CONFIG_DRM_LIMA={m,y}, CONFIG_DRM_PANFROST={m,y} and CONFIG_DEVFREQ_THERMAL=n after both, the lima and panfrost drivers gained devfreq cooling support. [0] https://www.spinics.net/lists/dri-devel/msg252825.html Fixes: a76caf5 ("thermal: Add devfreq cooling") Cc: [email protected] Reported-by: Thomas Zimmermann <[email protected]> Signed-off-by: Martin Blumenstingl <[email protected]> Tested-by: Thomas Zimmermann <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 76a5c40 commit 3f5b995

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/devfreq_cooling.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void devfreq_cooling_unregister(struct thermal_cooling_device *dfc);
7575

7676
#else /* !CONFIG_DEVFREQ_THERMAL */
7777

78-
struct thermal_cooling_device *
78+
static inline struct thermal_cooling_device *
7979
of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
8080
struct devfreq_cooling_power *dfc_power)
8181
{

0 commit comments

Comments
 (0)