of: clean up OF_CONTROL ifdef conditionals
[platform/kernel/u-boot.git] / drivers / serial / serial-uclass.c
index 2a49697..55011cc 100644 (file)
@@ -32,7 +32,7 @@ static void serial_find_console_or_panic(void)
        struct udevice *dev;
        int node;
 
-       if (OF_CONTROL && gd->fdt_blob) {
+       if (CONFIG_IS_ENABLED(OF_CONTROL) && gd->fdt_blob) {
                /* Check for a chosen console */
                node = fdtdec_get_chosen_node(gd->fdt_blob, "stdout-path");
                if (node < 0)
@@ -55,7 +55,7 @@ static void serial_find_console_or_panic(void)
                        }
                }
        }
-       if (!SPL_BUILD || !OF_CONTROL || !gd->fdt_blob) {
+       if (!SPL_BUILD || !CONFIG_IS_ENABLED(OF_CONTROL) || !gd->fdt_blob) {
                /*
                * Try to use CONFIG_CONS_INDEX if available (it is numbered
                * from 1!).