mirror of
https://github.com/apache/nuttx.git
synced 2026-08-18 11:41:51 +08:00
The ondemand governor (devfreq_ondemand.c) references dev->governor_data to store its private state, and defines devfreq_ondemand(), but neither the field in struct devfreq_s nor the function declaration were present in include/nuttx/devfreq.h. As a result, building with CONFIG_DEVFREQ_GOV_ONDEMAND=y failed to compile. These two definitions were originally introduced by a downstream commit that was not part of the devfreq upstreaming series, so the gap only surfaced when the ondemand governor is enabled (which additionally requires !CONFIG_SCHED_CPULOAD_NONE and is off by default). Add the governor_data field to struct devfreq_s and declare devfreq_ondemand() alongside the other governors. Signed-off-by: guanyi <guanyi@xiaomi.com>