public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: rawnand: Remove of_get_nand_on_flash_bbt() wrapper
@ 2022-01-06 13:16 Tudor Ambarus
  2022-01-06 13:16 ` [PATCH 2/2] mtd: rawnand: Rework of_get_nand_bus_width() Tudor Ambarus
  2022-01-23 15:43 ` [PATCH 1/2] mtd: rawnand: Remove of_get_nand_on_flash_bbt() wrapper Miquel Raynal
  0 siblings, 2 replies; 3+ messages in thread
From: Tudor Ambarus @ 2022-01-06 13:16 UTC (permalink / raw)
  To: miquel.raynal; +Cc: richard, vigneshr, linux-mtd, linux-kernel, Tudor Ambarus

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>
---
 drivers/mtd/nand/raw/nand_base.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 113a2e9f43b1..b8e7f1aae032 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -5287,11 +5287,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);
@@ -5375,7 +5370,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);
-- 
2.25.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-23 15:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-06 13:16 [PATCH 1/2] mtd: rawnand: Remove of_get_nand_on_flash_bbt() wrapper Tudor Ambarus
2022-01-06 13:16 ` [PATCH 2/2] mtd: rawnand: Rework of_get_nand_bus_width() Tudor Ambarus
2022-01-23 15:43 ` [PATCH 1/2] mtd: rawnand: Remove of_get_nand_on_flash_bbt() wrapper Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox