From 0d940461d47e05fca352daf8fe9813db32648ec4 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 12 Jan 2024 09:47:58 +0000 Subject: [PATCH] media: {cdi,is}_gpio: Initialize parent dev for gpio chip Set the parent node of the gc to the gpio device so that core will get the of_node of device from parent node. Bug 4387902 Change-Id: I795e612c11bdf72067b85d23ce5914abdcc3c139 Signed-off-by: Laxman Dewangan Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3052126 (cherry picked from commit d09293e954868bb542af43ecd726318ca7afd8c0) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053104 Tested-by: Jonathan Hunter Reviewed-by: Jonathan Hunter GVS: Gerrit_Virtual_Submit --- drivers/media/platform/tegra/cdi/cdi_gpio.c | 1 + drivers/media/platform/tegra/isc/isc_gpio.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/media/platform/tegra/cdi/cdi_gpio.c b/drivers/media/platform/tegra/cdi/cdi_gpio.c index 579721e5..5cbce785 100644 --- a/drivers/media/platform/tegra/cdi/cdi_gpio.c +++ b/drivers/media/platform/tegra/cdi/cdi_gpio.c @@ -288,6 +288,7 @@ static int cdi_gpio_probe(struct platform_device *pdev) gc->base = -1; gc->ngpio = pd->max_gpio; gc->label = "cdi-gpio"; + gc->parent = &pdev->dev; #if defined(NV_GPIO_CHIP_STRUCT_HAS_OF_NODE_PRESENT) /* Linux 6.2 */ gc->of_node = pdev->dev.of_node; #endif diff --git a/drivers/media/platform/tegra/isc/isc_gpio.c b/drivers/media/platform/tegra/isc/isc_gpio.c index 58dc0472..2fdbf45b 100644 --- a/drivers/media/platform/tegra/isc/isc_gpio.c +++ b/drivers/media/platform/tegra/isc/isc_gpio.c @@ -288,6 +288,7 @@ static int isc_gpio_probe(struct platform_device *pdev) gc->base = -1; gc->ngpio = pd->max_gpio; gc->label = "isc-gpio"; + gc->parent = &pdev->dev; #if defined(NV_GPIO_CHIP_STRUCT_HAS_OF_NODE_PRESENT) /* Linux 6.2 */ gc->of_node = pdev->dev.of_node; #endif