Thread (17 messages) 17 messages, 3 authors, 2026-01-24
STALE138d

[PATCH 04/10] platform/raspberrypi: vchiq: Add helpers for vchiq driver data

From: Jai Luthra <hidden>
Date: 2026-01-13 09:07:54
Also in: linux-media
Subsystem: broadcom bcm2711/bcm2835 arm architecture, the rest · Maintainers: Florian Fainelli, Linus Torvalds

Add helpers to set and get vchiq driver data. vchiq_set_drvdata() and
vchiq_get_drvdata() wraps dev_set_drvdata() and dev_get_drvdata()
respectively.

Signed-off-by: Umang Jain <redacted>
Signed-off-by: Jai Luthra <redacted>
---
 include/linux/raspberrypi/vchiq_bus.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/include/linux/raspberrypi/vchiq_bus.h b/include/linux/raspberrypi/vchiq_bus.h
index 9de179b39f85e5e94c1e948030fccf0c52a00fcd..6eff6b0bf5995683ef0468bc811334b7ff4f8c19 100644
--- a/include/linux/raspberrypi/vchiq_bus.h
+++ b/include/linux/raspberrypi/vchiq_bus.h
@@ -37,6 +37,16 @@ static inline struct vchiq_driver *to_vchiq_driver(struct device_driver *d)
 	return container_of(d, struct vchiq_driver, driver);
 }
 
+static inline void *vchiq_get_drvdata(const struct vchiq_device *device)
+{
+	return dev_get_drvdata(&device->dev);
+}
+
+static inline void vchiq_set_drvdata(struct vchiq_device *device, void *data)
+{
+	dev_set_drvdata(&device->dev, data);
+}
+
 extern const struct bus_type vchiq_bus_type;
 
 struct vchiq_device *
-- 
2.52.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help