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>
This commit is contained in:
@@ -159,16 +159,16 @@ static int p2sb_remove(struct udevice *dev)
|
||||
|
||||
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;
|
||||
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
|
||||
ret = dev_read_u32(dev, "intel,p2sb-port-id", &pid);
|
||||
if (ret)
|
||||
return ret;
|
||||
pplat->pid = pid;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user