diff options
author | Simon Glass <sjg@chromium.org> | 2015-01-25 08:27:04 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-29 17:09:55 -0700 |
commit | b367053102e597eb21b0a5e86c63e8d10f368cb0 (patch) | |
tree | 352917bf63f69dec8584a547c836548f87a07cde /drivers | |
parent | 0118ce79577f9b0881f99a6e4f8a79cd5014cb87 (diff) | |
download | u-boot-imx-b367053102e597eb21b0a5e86c63e8d10f368cb0.zip u-boot-imx-b367053102e597eb21b0a5e86c63e8d10f368cb0.tar.gz u-boot-imx-b367053102e597eb21b0a5e86c63e8d10f368cb0.tar.bz2 |
dm: core: Add a function to get a device's uclass ID
This is useful to check which uclass a device is in.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'drivers')
-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 365676b..2606d18 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -438,3 +438,8 @@ ulong dev_get_of_data(struct udevice *dev) { return dev->of_id->data; } + +enum uclass_id device_get_uclass_id(struct udevice *dev) +{ + return dev->uclass->uc_drv->id; +} |