Skip to contentSkip to conversation

Driver core: Add accessor for device platform data

PATCH New Mark Brown 1 participant 1 message Jul 17, 2009 Driver core

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 Driver core: Add accessor for device platform data

For consistency with driver data provide a dev_get_platdata() accessor for reading the platform data from a device.

---
 include/linux/device.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/linux/device.h +5 -0
index aebb810..c42d426 100644
@@ -446,6 +446,11 @@ static inline void set_dev_node(struct device *dev, int node)
 }
 #endif
 
+static inline void *dev_get_platdata(const struct device *dev)
+{
+	return dev->platform_data;
+}
+
 static inline void *dev_get_drvdata(const struct device *dev)
 {
 	return dev->driver_data;
Signature · 1 line
1.6.3.3