mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
gpu/host1x: Use conftest for Linux v6.3
Use conftest to determine if the uevent() function pointer in the bus_type structure has a const dev argument. This fixes the build for Linux kernels prior to Linux v6.3 that include the upstream change that changed the arguments to this function. Bug 4014315 Change-Id: I1553e08c951be9dd27141c273bf91be38dd954a6 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019964 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
067fbd7bbc
commit
5fe2e2aacc
@@ -6461,6 +6461,26 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_BUS_TYPE_STRUCT_REMOVE_HAS_INT_RETURN_TYPE" "" "types"
|
||||
;;
|
||||
|
||||
bus_type_struct_uevent_has_const_dev_arg)
|
||||
#
|
||||
# Determine if the 'uevent' callback from the 'bus_type' structure
|
||||
# has a const 'struct dev' argument.
|
||||
#
|
||||
# Commit 2a81ada32f0e ("driver core: make struct bus_type.uevent()
|
||||
# take a const *") updated the arguments to the uevent callback
|
||||
# function in Linux v6.3.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/device/bus.h>
|
||||
int conftest_bus_type_struct_remove_has_int_return_type(const struct device *dev,
|
||||
struct kobj_uevent_env *env,
|
||||
struct bus_type *bus) {
|
||||
return bus->uevent(dev, env);
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_BUS_TYPE_STRUCT_UEVENT_HAS_CONST_DEV_ARG" "" "types"
|
||||
;;
|
||||
|
||||
class_create_has_no_owner_arg)
|
||||
#
|
||||
# Determine if the class_create() function has the 'owner' argument.
|
||||
|
||||
Reference in New Issue
Block a user