diff options
| author | Simon Glass <[email protected]> | 2014-11-11 10:46:18 -0700 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2014-11-22 10:16:45 +0100 |
| commit | 2ef249b4420818d7ea31a031f48825e5f38ed3ac (patch) | |
| tree | 5f02f7a902dd73e2c7bd0fafe9fa643d0f69c361 /drivers/core/device.c | |
| parent | c1a6f371ae65f1a3709e872e08bed51321e292fc (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.c | 5 |
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; +} |
