projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b402843
)
Driver core: Add accessor for device platform data
author
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Fri, 17 Jul 2009 14:06:08 +0000
(15:06 +0100)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 15 Sep 2009 16:50:47 +0000
(09:50 -0700)
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>
include/linux/device.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/device.h
b/include/linux/device.h
index c0bd23048be08861c5912fdd970f8b26a27181e8..3f33f17f556c647743d436123ad863730185e011 100644
(file)
--- a/
include/linux/device.h
+++ b/
include/linux/device.h
@@
-494,6
+494,11
@@
static inline struct device *root_device_register(const char *name)
}
extern void root_device_unregister(struct device *root);
+static inline void *dev_get_platdata(const struct device *dev)
+{
+ return dev->platform_data;
+}
+
/*
* Manual binding of a device to driver. See drivers/base/bus.c
* for information on use.