diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-29 06:34:54 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-01-05 22:26:35 +0300 |
commit | 20e442ab2df355450006574fff178c746d254a18 (patch) | |
tree | 7e4eae44adf14d155a5cb028a909cdcf8174eab3 /include/dm/device.h | |
parent | be3bd3bb177ec913050745131687089c1ff69c44 (diff) | |
download | u-boot-20e442ab2df355450006574fff178c746d254a18.tar.xz |
dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()
The current macro is a misnomer since it does not declare a device
directly. Instead, it declares driver_info record which U-Boot uses at
runtime to create a device.
The distinction seems somewhat minor most of the time, but is becomes
quite confusing when we actually want to declare a device, with
of-platdata. We are left trying to distinguish between a device which
isn't actually device, and a device that is (perhaps an 'instance'?)
It seems better to rename this macro to describe what it actually is. The
macros is not widely used, since boards should use devicetree to declare
devices.
Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is
declaring a new driver_info record, not a device.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm/device.h')
-rw-r--r-- | include/dm/device.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/dm/device.h b/include/dm/device.h index 4469804a00..e16ba2405f 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -104,7 +104,7 @@ enum { * particular port or peripheral (essentially a driver instance). * * A device will come into existence through a 'bind' call, either due to - * a U_BOOT_DEVICE() macro (in which case plat is non-NULL) or a node + * a U_BOOT_DRVINFO() macro (in which case plat is non-NULL) or a node * in the device tree (in which case of_offset is >= 0). In the latter case * we translate the device tree information into plat in a function * implemented by the driver of_to_plat method (called just before the @@ -293,7 +293,7 @@ struct udevice_id { * platform data to be allocated in the device's ->plat pointer. * This is typically only useful for device-tree-aware drivers (those with * an of_match), since drivers which use plat will have the data - * provided in the U_BOOT_DEVICE() instantiation. + * provided in the U_BOOT_DRVINFO() instantiation. * @per_child_auto: Each device can hold private data owned by * its parent. If required this will be automatically allocated if this * value is non-zero. |