drivers: Drop version check for DMA BUF namespace

The MODULE_IMPORT_NS macro adds a namespace tag to the module
information. The DMA_BUF namespace is required for Linux v5.16+ kernels
for drivers that use DMA BUF, there is no reason not to populate this
for earlier kernels. Furthermore, some 3rd party kernels prior to v5.16
may require this too and so drop the version check around the DMA BUF
namespace.

Bug 4119327

Change-Id: If8a5e90340f7a0582247cb91611d275ec1f4990e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2979260
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2023-09-12 22:27:40 +01:00
committed by mobile promotions
parent f4b8e44a5e
commit cdc64f43fa
7 changed files with 0 additions and 16 deletions

View File

@@ -24,9 +24,7 @@
#include "drm.h"
#include "gem.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
MODULE_IMPORT_NS(DMA_BUF);
#endif
static unsigned int sg_dma_count_chunks(struct scatterlist *sgl, unsigned int nents)
{

View File

@@ -8,9 +8,7 @@
#include "mods_internal.h"
#if KERNEL_VERSION(5, 4, 0) <= MODS_KERNEL_VERSION
MODULE_IMPORT_NS(DMA_BUF);
#endif
static struct device *dummy_device;

View File

@@ -14,7 +14,6 @@
#include <linux/platform_device.h>
#include <linux/printk.h>
#include <linux/types.h>
#include <linux/version.h>
#include <drm/tegra_drm-next.h>
#include "common.h"
@@ -381,6 +380,4 @@ err:
return ret;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
MODULE_IMPORT_NS(DMA_BUF);
#endif

View File

@@ -471,10 +471,7 @@ static struct platform_driver fsicom_client = {
module_platform_driver(fsicom_client);
#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 15, 0)
MODULE_IMPORT_NS(DMA_BUF);
#endif
MODULE_DESCRIPTION("FSI-CCPLEX-COM driver");
MODULE_AUTHOR("Prashant Shaw <pshaw@nvidia.com>");
MODULE_LICENSE("GPL v2");

View File

@@ -1516,8 +1516,6 @@ static void __exit nvdla_exit(void)
module_exit(nvdla_exit);
#endif
#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE
MODULE_IMPORT_NS(DMA_BUF);
#endif
MODULE_AUTHOR("Shridhar Rasal <srasal@nvidia.com>");
MODULE_LICENSE("GPL v2");

View File

@@ -1655,7 +1655,5 @@ static void __exit nvpva_exit(void)
module_exit(nvpva_exit);
#endif
#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE
MODULE_IMPORT_NS(DMA_BUF);
#endif
MODULE_LICENSE("GPL v2");

View File

@@ -1057,9 +1057,7 @@ static void __exit nvmap_exit_driver(void)
nvmap_dev = NULL;
}
module_exit(nvmap_exit_driver);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
MODULE_IMPORT_NS(DMA_BUF);
#endif
MODULE_DESCRIPTION("NvMap: Nvidia Tegra Memory Management Driver");
MODULE_AUTHOR("Puneet Saxena <puneets@nvidia.com>");
MODULE_LICENSE("GPL v2");