[PATCH v2 09/15] staging: vc04_services: Add helpers for vchiq driver data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <umang.jain@xxxxxxxxxxxxxxxx>
---
 .../vc04_services/interface/vchiq_arm/vchiq_bus.h      | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h
index caa6fdf25bb1..800f53bb48c2 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h
@@ -34,6 +34,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 struct bus_type vchiq_bus_type;
 
 struct vchiq_device *
-- 
2.41.0





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux