aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-17 10:06:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 12:50:47 -0400
commita5b8b1ada6dd76503884f5492b995cd29eefae0f (patch)
tree5fce8cc942c686fb1ce73a4c714581c389606258 /include
parentb4028437876866aba4747a655ede00f892089e14 (diff)
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. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index c0bd23048be0..3f33f17f556c 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -494,6 +494,11 @@ static inline struct device *root_device_register(const char *name)
494} 494}
495extern void root_device_unregister(struct device *root); 495extern void root_device_unregister(struct device *root);
496 496
497static inline void *dev_get_platdata(const struct device *dev)
498{
499 return dev->platform_data;
500}
501
497/* 502/*
498 * Manual binding of a device to driver. See drivers/base/bus.c 503 * Manual binding of a device to driver. See drivers/base/bus.c
499 * for information on use. 504 * for information on use.