diff --git a/drivers/block/tegra_virt_storage/Makefile b/drivers/block/tegra_virt_storage/Makefile index 7cf17404..e2eb9184 100644 --- a/drivers/block/tegra_virt_storage/Makefile +++ b/drivers/block/tegra_virt_storage/Makefile @@ -1,13 +1,21 @@ -# SPDX-License-Identifier: GPL-2.0 -# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: GPL-2.0-only +# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Makefile for Virtual Storage Driver # +LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL)) +LINUX_VERSION_6_11 := $(shell expr 6 \* 256 + 11) + +# Use dummy driver for Kernel versions greater than or equal to Linux v6.11 +ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_11); echo $$?),0) +tegra_vblk-y += tegra_hv_vblk_dummy.o +else tegra_vblk-y += tegra_hv_vblk.o tegra_vblk-y += tegra_hv_ioctl.o tegra_vblk-y += tegra_hv_mmc.o tegra_vblk-y += tegra_hv_scsi.o tegra_vblk-y += tegra_hv_ufs.o +endif obj-m += tegra_vblk.o diff --git a/drivers/block/tegra_virt_storage/tegra_hv_vblk_dummy.c b/drivers/block/tegra_virt_storage/tegra_hv_vblk_dummy.c new file mode 100644 index 00000000..46f1c946 --- /dev/null +++ b/drivers/block/tegra_virt_storage/tegra_hv_vblk_dummy.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0-only +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + +#include + +/* Dummy implementation for module */ +static int __init tegra_hv_vblk_dummy_init(void) +{ + return 0; +} +device_initcall(tegra_hv_vblk_dummy_init); + +MODULE_AUTHOR("Jon Hunter "); +MODULE_DESCRIPTION("Dummy Tegra HV VBLK driver"); +MODULE_LICENSE("GPL"); +