From 91df565fffd8aded77a08e46b677114a52dc5820 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Thu, 27 Feb 2025 17:47:55 +0000
Subject: [PATCH] drm: vc4: hvs: Fix vc6_hvs_debugfs_dlist state lookup

vc4's debugfs support was updated with drm_debugfs_entry whilst
BCM2712 support was in progress, and missed that the lookup
in vc6_hvs_debugfs_dlist still followed the old pattern.

Correct that lookup to avoid an invalid dereference.

Fixes: f7af8ae9d328 ("drm/vc4: hvs: Add support for BCM2712 HVS")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 drivers/gpu/drm/vc4/vc4_hvs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/vc4/vc4_hvs.c
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
@@ -281,8 +281,8 @@ static int vc4_hvs_debugfs_dlist(struct
 
 static int vc6_hvs_debugfs_dlist(struct seq_file *m, void *data)
 {
-	struct drm_info_node *node = m->private;
-	struct drm_device *dev = node->minor->dev;
+	struct drm_debugfs_entry *entry = m->private;
+	struct drm_device *dev = entry->dev;
 	struct vc4_dev *vc4 = to_vc4_dev(dev);
 	struct vc4_hvs *hvs = vc4->hvs;
 	struct drm_printer p = drm_seq_file_printer(m);
