[PATCH 2/2] MIPS: Octeon: offer the RedBoot parser when it is modular

From: Orgad Shaneh

Date: Tue Sep 15 2026 - 04:26:07 EST


The bootbus flash driver lists "RedBoot" among the partition parsers to
try under "#ifdef CONFIG_MTD_REDBOOT_PARTS", so building that parser as
a module drops it from the list and the partitions on such a chip are
never found.

Use IS_ENABLED(), like the USB device-tree fixups in octeon-platform.c.

Untested - I have no board with RedBoot partitions; the change is by
inspection, in the same family as the two above.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Orgad Shaneh <orgads@xxxxxxxxx>
---
diff --git a/arch/mips/cavium-octeon/flash_setup.c b/arch/mips/cavium-octeon/flash_setup.c
--- a/arch/mips/cavium-octeon/flash_setup.c
+++ b/arch/mips/cavium-octeon/flash_setup.c
@@ -22,7 +22,7 @@ static struct map_info flash_map;
static struct mtd_info *mymtd;
static const char *part_probe_types[] = {
"cmdlinepart",
-#ifdef CONFIG_MTD_REDBOOT_PARTS
+#if IS_ENABLED(CONFIG_MTD_REDBOOT_PARTS)
"RedBoot",
#endif
NULL
--
2.47.0