devfreq: add compatibility wrapper for moved governor.h - #1087
Closed
Salendarsingh Gaud (sgaud-quic) wants to merge 1 commit into
Closed
Conversation
Commit 6df46fd ("FROMGIT: PM / devfreq: Move governor.h to a public header location") was backported into qcom-6.18.y, relocating drivers/devfreq/governor.h to include/linux/devfreq-governor.h. Out-of-tree kernel modules (e.g. kgsl-dlkm) that build against qcom-6.18.y add drivers/devfreq/ to their include search path via ccflags-y += -I$(KERNEL_SRC)/drivers/devfreq and use: #include "governor.h" After the move that file is gone, causing a build failure for every Yocto target that builds kgsl-dlkm: governor_msm_adreno_tz.c:30:10: fatal error: governor.h: No such file or directory governor_gpubw_mon.c:14:10: fatal error: governor.h: No such file or directory Add a compatibility wrapper at the old location that transparently redirects to the new public header. This is the standard Linux kernel pattern for header relocations and avoids breaking existing out-of-tree consumers while they migrate. New in-tree and out-of-tree drivers must use #include <linux/devfreq-governor.h> directly. This shim will be removed once all known consumers are updated. Fixes: 6df46fd ("FROMGIT: PM / devfreq: Move governor.h to a public header location") Signed-off-by: Salendarsingh Gaud <sgaud@qti.qualcomm.com>
Salendarsingh Gaud (sgaud-quic)
requested review from
a team,
Amit Kucheria (idlethread),
jingyiwang42 and
Shiraz Hashim (shashim-quic)
September 11, 2026 10:30
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
devfreq: add compatibility wrapper for moved governor.h
Problem
All Yocto nightly builds against
qcom-6.18.ytip are failing with:Root Cause
Commit
6df46fd1d1b5(FROMGIT: PM / devfreq: Move governor.h to a public header location) was backported intoqcom-6.18.y, relocatingdrivers/devfreq/governor.h→include/linux/devfreq-governor.h.Out-of-tree modules such as
kgsl-dlkmbuild with:and include the header as:
kgsl-dlkmv1.0.14 guards the new path behindKERNEL_VERSION(6, 19, 0)(matching the upstream mainline target), so on
qcom-6.18.ythe old pathis taken — but the file is gone.
Fix
Add a compatibility wrapper at
drivers/devfreq/governor.hthattransparently forwards to
<linux/devfreq-governor.h>. This is thestandard Linux kernel pattern for header relocations (used widely across
subsystems) and avoids breaking existing out-of-tree consumers while they
migrate.
New drivers must use
#include <linux/devfreq-governor.h>directly.This shim can be dropped once all known consumers (kgsl-dlkm etc.) are
updated to use the new path.
Related
KERNEL_VERSION(6, 19, 0)to__has_include(<linux/devfreq-governor.h>)Fixes: 6df46fd ("FROMGIT: PM / devfreq: Move governor.h to a public header location")