From 19c93284bd0f3790b6ae9ab96bea86765e133709 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Fri, 26 Jul 2024 17:24:40 +0100 Subject: [PATCH] misc: mods: Disable MODS for Linux v6.11 In Linux v6.11, the 'platform_driver' structure 'remove' callback was updated to return void instead of 'int'. This breaks the build for various MODS drivers and so disable these for Linux v6.11 and greater. Bug 4749580 Change-Id: Ie76da62af1b9645d24964165fd656b21ea67f78c Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3183067 GVS: buildbot_gerritrpt Reviewed-by: Laxman Dewangan --- drivers/misc/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 84f1a03b..2f43ff1e 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -1,9 +1,15 @@ -# SPDX-License-Identifier: GPL-2.0 -# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved. +# SPDX-License-Identifier: GPL-2.0-only +# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL)) +LINUX_VERSION_6_11 := $(shell expr 6 \* 256 + 11) + +# MODS is currently broken for Linux v6.11 and later +ifeq ($(shell test $(LINUX_VERSION) -lt $(LINUX_VERSION_6_11); echo $$?),0) ifndef CONFIG_TEGRA_SYSTEM_TYPE_ACK obj-m += mods/ endif +endif obj-m += nvsciipc/ ifdef CONFIG_PCI obj-m += tegra-pcie-dma-test.o