diff options
author | Simon Glass <sjg@chromium.org> | 2021-08-07 07:24:06 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-09-25 09:46:15 -0600 |
commit | dcfc42b12f95fecffbf4692854acd4193240d86a (patch) | |
tree | 0415ef0a2804ac9dff88bc8ecfd28cd39a740de2 /doc | |
parent | 62470afed14a598d36d055c60ccc3ffab6967dcc (diff) | |
download | u-boot-dcfc42b12f95fecffbf4692854acd4193240d86a.tar.gz u-boot-dcfc42b12f95fecffbf4692854acd4193240d86a.tar.bz2 u-boot-dcfc42b12f95fecffbf4692854acd4193240d86a.zip |
treewide: Try to avoid the preprocessor with OF_REAL
Convert some of these occurences to C code, where it is easy to do. This
should help encourage this approach to be used in new code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/develop/driver-model/of-plat.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/develop/driver-model/of-plat.rst b/doc/develop/driver-model/of-plat.rst index 8b16f55301..507731a170 100644 --- a/doc/develop/driver-model/of-plat.rst +++ b/doc/develop/driver-model/of-plat.rst @@ -215,16 +215,16 @@ For example: static int mmc_of_to_plat(struct udevice *dev) { - #if CONFIG_IS_ENABLED(OF_REAL) + if (CONFIG_IS_ENABLED(OF_REAL)) { /* Decode the devicetree data */ struct mmc_plat *plat = dev_get_plat(dev); const void *blob = gd->fdt_blob; int node = dev_of_offset(dev); plat->fifo_depth = fdtdec_get_int(blob, node, "fifo-depth", 0); - #endif + } - return 0; + return 0; } static int mmc_probe(struct udevice *dev) |