diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2020-12-05 19:12:36 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2020-12-06 19:00:35 +0000 |
commit | f914dcf3dda8d7047250969d13e9f0e19efd4221 (patch) | |
tree | 1c567acf3fe3d37fc6cf70b93f408e5aa20e2518 /src/include | |
parent | 1a341af2f64337f0b51e6a6d24df72614924c750 (diff) |
include/device/device: add comment that config_of_soc never returns NULL
Since config_of() calls die() if dev or dev->chip_info are NULL,
config_of_soc() will either return a non-NULL pointer or won't return.
Change-Id: I6de6bb1610e823af215436c94ff1a78ff6b86b78
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48359
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/device/device.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/device/device.h b/src/include/device/device.h index 8a481b2ca2..786a640f39 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -385,6 +385,7 @@ static inline DEVTREE_CONST void *config_of(const struct device *dev) devtree_die(); } +/* config_of_soc() either returns a non-NULL pointer or dies in the config_of() call. */ static inline DEVTREE_CONST void *config_of_soc(void) { return config_of(pcidev_on_root(0, 0)); |