summaryrefslogtreecommitdiff
path: root/drivers/core/device.c
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2014-11-11 10:46:18 -0700
committerSimon Glass <[email protected]>2014-11-22 10:16:45 +0100
commit2ef249b4420818d7ea31a031f48825e5f38ed3ac (patch)
tree5f02f7a902dd73e2c7bd0fafe9fa643d0f69c361 /drivers/core/device.c
parentc1a6f371ae65f1a3709e872e08bed51321e292fc (diff)
dm: core: Allow access to the device's driver_id data
When the device is created from a device tree node, it matches a compatible string. Allow access to that string and the associated data. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]> Acked-by: Heiko Schocher <[email protected]>
Diffstat (limited to 'drivers/core/device.c')
-rw-r--r--drivers/core/device.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 576a4f253b8..81ddecade28 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -380,3 +380,8 @@ int device_find_next_child(struct udevice **devp)
return 0;
}
+
+ulong dev_get_of_data(struct udevice *dev)
+{
+ return dev->of_id->data;
+}