mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
Some distros might use old kernel source but with some latest upstream kernel patches backported to their kernel source tree. To deal with this scenario and avoid kernel compilation failure, use conftest to check the existence of features against the kernel source tree which the OOT modules are built upon and do the conditional build based on the test result generated with the conftest tool. Use NV_DEVFREQ_HAS_FREQ_TABLE to determine whether freq_table field is there in struct devfreq data strcuture, and choose the correct path for building the module. Use tegra_wmark-specific devfreq_get_freq_range always to avoid kernel version check and conftest check. Since devfreq_get_freq_range exists in the devfreq-specific governor.h (e.g. drivers/devfreq/governor.h) file instead of globabl linux kernel include header files (e.g. include/linux/devfreq.h), conftest cannot be used to the existence of devfreq_get_freq_range kernel function. Bug 4884092 Change-Id: I5bde4c712f59f38de74c1d8d95135c9b25d621b1 Signed-off-by: Johnny Liu <johnliu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220896 Tested-by: Paritosh Dixit <paritoshd@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
15 KiB
15 KiB