Jon Hunter 742e79fa06 tegra: hwpm: Simplify CONFTEST presence check
The variable 'NV_BUILD_SYSTEM_TYPE' is an NVIDIA internal Makefile
variable used for building the Linux kernel. We should avoid using this
in drivers where possible because otherwise it will require external
users to set this.

CONFTEST itself is not internal and is distributed with the NVIDIA OOT
drivers. Rather than using 'NV_BUILD_SYSTEM_TYPE' to see if CONFTEST is
presence, we can simply see if the 'srctree.conftest' variable is set
and avoid using 'NV_BUILD_SYSTEM_TYPE' at all.

Furthermore, given that the variable 'CONFIG_TEGRA_HWPM_CONFTEST' now
defines if CONFTEST is present and this will only be set in the Makefile
if 'CONFIG_TEGRA_HWPM_OOT' is set, then we don't need to check for both
of these variables in the source files to determine if we need to
include 'nvidia/conftest.h'.

Bug 5120925

Change-Id: If9f6cebc7cc38414fce10a445ed090ba345e5002
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/3318049
Reviewed-by: Yifei Wan <ywan@nvidia.com>
Reviewed-by: Besar Wicaksono <bwicaksono@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
2025-03-15 05:59:36 -07:00
2024-07-16 02:06:57 -07:00
Description
No description provided
1.9 MiB