Skip to content

Commit

Permalink
mtd: rawnand: Remove of_get_nand_on_flash_bbt() wrapper
Browse files Browse the repository at this point in the history
Remove the wrapper as it hides for no reason what we really want: find an
of_property. Removing the wrapper makes the code easier to read.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220106131610.225661-1-tudor.ambarus@microchip.com
  • Loading branch information
Tudor Ambarus authored and Miquel Raynal committed Jan 23, 2022
1 parent 3e68f33 commit dbfbe79
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/mtd/nand/raw/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -5290,11 +5290,6 @@ static int of_get_nand_bus_width(struct device_node *np)
}
}

static bool of_get_nand_on_flash_bbt(struct device_node *np)
{
return of_property_read_bool(np, "nand-on-flash-bbt");
}

static int of_get_nand_secure_regions(struct nand_chip *chip)
{
struct device_node *dn = nand_get_flash_node(chip);
Expand Down Expand Up @@ -5378,7 +5373,7 @@ static int rawnand_dt_init(struct nand_chip *chip)
if (of_property_read_bool(dn, "nand-is-boot-medium"))
chip->options |= NAND_IS_BOOT_MEDIUM;

if (of_get_nand_on_flash_bbt(dn))
if (of_property_read_bool(dn, "nand-on-flash-bbt"))
chip->bbt_options |= NAND_BBT_USE_FLASH;

of_get_nand_ecc_user_config(nand);
Expand Down

0 comments on commit dbfbe79

Please sign in to comment.