aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-08-07 07:24:06 -0600
committerSimon Glass <sjg@chromium.org>2021-09-25 09:46:15 -0600
commitdcfc42b12f95fecffbf4692854acd4193240d86a (patch)
tree0415ef0a2804ac9dff88bc8ecfd28cd39a740de2 /drivers/misc
parent62470afed14a598d36d055c60ccc3ffab6967dcc (diff)
downloadu-boot-dcfc42b12f95fecffbf4692854acd4193240d86a.zip
u-boot-dcfc42b12f95fecffbf4692854acd4193240d86a.tar.gz
u-boot-dcfc42b12f95fecffbf4692854acd4193240d86a.tar.bz2
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 'drivers/misc')
-rw-r--r--drivers/misc/p2sb-uclass.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c
index 98d58b3..f24857a 100644
--- a/drivers/misc/p2sb-uclass.c
+++ b/drivers/misc/p2sb-uclass.c
@@ -183,16 +183,16 @@ int p2sb_set_port_id(struct udevice *dev, int portid)
static int p2sb_child_post_bind(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_REAL)
- struct p2sb_child_plat *pplat = dev_get_parent_plat(dev);
- int ret;
- u32 pid;
-
- ret = dev_read_u32(dev, "intel,p2sb-port-id", &pid);
- if (ret)
- return ret;
- pplat->pid = pid;
-#endif
+ if (CONFIG_IS_ENABLED(OF_REAL)) {
+ struct p2sb_child_plat *pplat = dev_get_parent_plat(dev);
+ int ret;
+ u32 pid;
+
+ ret = dev_read_u32(dev, "intel,p2sb-port-id", &pid);
+ if (ret)
+ return ret;
+ pplat->pid = pid;
+ }
return 0;
}