mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
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 <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2979476 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
f8f33d49cc
commit
00e11cac47
@@ -12,7 +12,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
@@ -975,11 +974,7 @@ static int nvpps_probe(struct platform_device *pdev)
|
|||||||
return -ENOMEM;
|
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);
|
err = of_get_named_gpio(np, "gpios", 0);
|
||||||
#endif
|
|
||||||
if (err == -EPROBE_DEFER) {
|
if (err == -EPROBE_DEFER) {
|
||||||
return err;
|
return err;
|
||||||
} else if (err < 0) {
|
} else if (err < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user