From bc87e8989ddf2f74ff2c988a25e4a81e559a5c30 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 22 Aug 2017 08:31:32 -0700 Subject: gpu: nvgpu: Remove support for old kernel version Remove support for pre-4.4 kernels. This allows deleting the checks for kernel version, and usage of linux/version.h. Change-Id: I4d6cb30512ea164d27549f4f4d096e5931bb1379 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1543499 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/clk.c | 1 - drivers/gpu/nvgpu/common/linux/dma.c | 1 + drivers/gpu/nvgpu/common/linux/firmware.c | 4 ---- drivers/gpu/nvgpu/common/linux/module.c | 2 -- drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | 5 ----- drivers/gpu/nvgpu/common/linux/sysfs.c | 1 - 6 files changed, 1 insertion(+), 13 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux') diff --git a/drivers/gpu/nvgpu/common/linux/clk.c b/drivers/gpu/nvgpu/common/linux/clk.c index 892b892a..3f768867 100644 --- a/drivers/gpu/nvgpu/common/linux/clk.c +++ b/drivers/gpu/nvgpu/common/linux/clk.c @@ -17,7 +17,6 @@ */ #include -#include #include diff --git a/drivers/gpu/nvgpu/common/linux/dma.c b/drivers/gpu/nvgpu/common/linux/dma.c index 2116053d..cd6ad1b2 100644 --- a/drivers/gpu/nvgpu/common/linux/dma.c +++ b/drivers/gpu/nvgpu/common/linux/dma.c @@ -16,6 +16,7 @@ #include #include +#include #include #include diff --git a/drivers/gpu/nvgpu/common/linux/firmware.c b/drivers/gpu/nvgpu/common/linux/firmware.c index b49bc4a3..44ff1507 100644 --- a/drivers/gpu/nvgpu/common/linux/firmware.c +++ b/drivers/gpu/nvgpu/common/linux/firmware.c @@ -44,14 +44,10 @@ static const struct firmware *do_request_firmware(struct device *dev, fw_name = fw_path; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) - err = request_firmware(&fw, fw_name, dev); -#else if (flags & NVGPU_REQUEST_FIRMWARE_NO_WARN) err = request_firmware_direct(&fw, fw_name, dev); else err = request_firmware(&fw, fw_name, dev); -#endif nvgpu_kfree(get_gk20a(dev), fw_path); if (err) diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index f5c6ca1f..691fdd69 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c @@ -1025,9 +1025,7 @@ static struct platform_driver gk20a_driver = { .driver = { .owner = THIS_MODULE, .name = "gk20a", -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) .probe_type = PROBE_PREFER_ASYNCHRONOUS, -#endif #ifdef CONFIG_OF .of_match_table = tegra_gk20a_of_match, #endif diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c index 71081be5..2c556d8a 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c @@ -13,7 +13,6 @@ * more details. */ -#include #include #include #include @@ -822,10 +821,8 @@ static int gk20a_tegra_probe(struct device *dev) dev_warn(dev, "board does not support scaling"); } platform->g->clk.gpc_pll.id = GM20B_GPC_PLL_B1; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) if (tegra_chip_get_revision() > TEGRA210_REVISION_A04p) platform->g->clk.gpc_pll.id = GM20B_GPC_PLL_C1; -#endif } if (tegra_get_chip_id() == TEGRA132) @@ -841,9 +838,7 @@ static int gk20a_tegra_probe(struct device *dev) return ret; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) pmc = ioremap(TEGRA_PMC_BASE, 4096); -#endif return 0; } diff --git a/drivers/gpu/nvgpu/common/linux/sysfs.c b/drivers/gpu/nvgpu/common/linux/sysfs.c index 28ebb21d..1b59c480 100644 --- a/drivers/gpu/nvgpu/common/linux/sysfs.c +++ b/drivers/gpu/nvgpu/common/linux/sysfs.c @@ -14,7 +14,6 @@ * along with this program. If not, see . */ -#include #include #include #include -- cgit v1.2.2