[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210423182146.185633-2-lyude@redhat.com>
Date: Fri, 23 Apr 2021 14:21:45 -0400
From: Lyude Paul <lyude@...hat.com>
To: linux-tegra@...r.kernel.org, dri-devel@...ts.freedesktop.org
Cc: Thierry Reding <treding@...dia.com>,
Ville Syrjälä
<ville.syrjala@...ux.intel.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 1/2] drm/tegra: Get ref for DP AUX channel, not its ddc adapter
While we're taking a reference of the DDC adapter for a DP AUX channel in
tegra_sor_probe() because we're going to be using that adapter with the
SOR, now that we've moved where AUX registration happens the actual device
structure for the DDC adapter isn't initialized yet. Which means that we
can't really take a reference from it to try to keep it around anymore.
This should be fine though, because we can just take a reference of its
parent instead.
Signed-off-by: Lyude Paul <lyude@...hat.com>
Fixes: 39c17ae60ea9 ("drm/tegra: Don't register DP AUX channels before connectors")
Cc: Lyude Paul <lyude@...hat.com>
Cc: Thierry Reding <thierry.reding@...il.com>
Cc: Jonathan Hunter <jonathanh@...dia.com>
Cc: dri-devel@...ts.freedesktop.org
Cc: linux-tegra@...r.kernel.org
---
drivers/gpu/drm/tegra/sor.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 7b88261f57bb..4e0e3a63e586 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -3739,11 +3739,11 @@ static int tegra_sor_probe(struct platform_device *pdev)
if (!sor->aux)
return -EPROBE_DEFER;
- if (get_device(&sor->aux->ddc.dev)) {
- if (try_module_get(sor->aux->ddc.owner))
+ if (get_device(sor->aux->dev)) {
+ if (try_module_get(sor->aux->dev->driver->owner))
sor->output.ddc = &sor->aux->ddc;
else
- put_device(&sor->aux->ddc.dev);
+ put_device(sor->aux->dev);
}
}
--
2.30.2
Powered by blists - more mailing lists