All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Driver core: Add accessor for device platform data
@ 2009-07-17 14:06 Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2009-07-17 14:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Mark Brown

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

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/linux/device.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index aebb810..c42d426 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -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;
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-17 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-17 14:06 [PATCH] Driver core: Add accessor for device platform data Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.