[PATCH] gpu: host1x: fix missing 'host1x_context_device_bus_type'

From: Ben Dooks

Date: Fri Jan 09 2026 - 07:56:29 EST


The drivers/gpu/host1x/context_bus.c does not include
any declaration of host1x_context_device_bus_type, and
after including "context.h" it also showed that there
are two definitons in the kernel, so fix those two

Change context.h to include the correct definiton of
host1x_context_device_bus_type by including
<linux/host1x_context_bus.h> in context.h

Fixes the following sparse warning:
drivers/gpu/host1x/context_bus.c:9:23: warning: symbol 'host1x_context_device_bus_type' was not declared. Should it be static?

Fixes: 3d70eb8e60c6d009c988 ("gpu: host1x: Make host1x_context_device_bus_type constant")
Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>
---
drivers/gpu/host1x/context.h | 3 +--
drivers/gpu/host1x/context_bus.c | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/host1x/context.h b/drivers/gpu/host1x/context.h
index 3e03bc1d3bac..5215922905ed 100644
--- a/drivers/gpu/host1x/context.h
+++ b/drivers/gpu/host1x/context.h
@@ -10,11 +10,10 @@

#include <linux/mutex.h>
#include <linux/refcount.h>
+#include <linux/host1x_context_bus.h>

struct host1x;

-extern struct bus_type host1x_context_device_bus_type;
-
struct host1x_memory_context_list {
struct mutex lock;
struct host1x_memory_context *devs;
diff --git a/drivers/gpu/host1x/context_bus.c b/drivers/gpu/host1x/context_bus.c
index 7cd0e1a5edd1..89f61b1f7d33 100644
--- a/drivers/gpu/host1x/context_bus.c
+++ b/drivers/gpu/host1x/context_bus.c
@@ -6,6 +6,8 @@
#include <linux/device.h>
#include <linux/of.h>

+#include "context.h"
+
const struct bus_type host1x_context_device_bus_type = {
.name = "host1x-context",
};
--
2.37.2.352.g3c44437643