From 00e11cac47cdbd278f1b5f89b6c4caf782f82b9d Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 12 Sep 2023 23:14:03 +0100 Subject: [PATCH] nvpps: Always use of_get_named_gpio The function of_get_named_gpio() was first added for Linux v3.1 and is still supported for in the latest mainline kernel. Therefore, always use of_get_named_gpio() and avoid the unnecessary kernel version check. Bug 4119327 Change-Id: I95e2458fdf00404bf91aa3e31e33dd2911377f48 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2979476 Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit --- drivers/nvpps/nvpps_main.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/nvpps/nvpps_main.c b/drivers/nvpps/nvpps_main.c index 61a9e5be..bae27d80 100644 --- a/drivers/nvpps/nvpps_main.c +++ b/drivers/nvpps/nvpps_main.c @@ -12,7 +12,6 @@ * */ - #include #include #include @@ -975,11 +974,7 @@ static int nvpps_probe(struct platform_device *pdev) return -ENOMEM; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0) - err = of_get_gpio(np, 0); -#else err = of_get_named_gpio(np, "gpios", 0); -#endif if (err == -EPROBE_DEFER) { return err; } else if (err < 0) {