media: camera: Remove devm_fwnode_get_gpiod_from_child

The function devm_fwnode_get_gpiod_from_child() was removed in Linux
v6.2. This function has always called devm_fwnode_gpiod_get_index() and
this was first introduced in Linux v5.5. Therefore, remove
devm_fwnode_get_gpiod_from_child() and always use
devm_fwnode_gpiod_get_index().

Bug 4346767

Change-Id: Ie94a20ffda67569962fa48d7104c8ff706be079d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3034777
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2023-12-14 12:09:12 +00:00
committed by mobile promotions
parent 891d093a76
commit 75c908beb6

View File

@@ -31,7 +31,6 @@
#include <media/cdi-mgr.h>
#include <linux/gpio/consumer.h>
#include <linux/semaphore.h>
#include <linux/version.h>
#include <asm/barrier.h>
@@ -1662,13 +1661,8 @@ static int cdi_mgr_configure_gpios(struct device *dev, struct cdi_mgr_priv *cdi_
}
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)
cdi_mgr->gpios[i].desc = devm_fwnode_get_gpiod_from_child(dev,
"devblk", &child->fwnode, GPIOD_ASIS, NULL);
#else
cdi_mgr->gpios[i].desc = devm_fwnode_gpiod_get_index(dev,
&child->fwnode, "devblk", 0, GPIOD_ASIS, NULL);
#endif
if (IS_ERR(cdi_mgr->gpios[i].desc)) {
ret = PTR_ERR(cdi_mgr->gpios[i].desc);
if (ret < 0)