diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2017-08-23 17:24:46 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2017-10-02 15:16:59 +0200 |
commit | c8f0033be80ccb23230b6b572c328d1c02e4ad04 (patch) | |
tree | 918337d3ab3fe527ea9ac819c2d6d6cfd18a4796 /drivers | |
parent | 7b02a99744e495f630bdb5081c516d40e8112685 (diff) |
mtd: gpmi: fsl,legacy-bch-geometry independent of nand-on-flash-bbt
The device tree property fsl,legacy-bch-geometry was only evaluated
when nand-on-flash-bbt was also defined. This looks wrong.
In mainline (as of 4.12) fsl,legacy-bch-geometry doesn't exist,
its functionality seems to be taken over by the fsl,use-minimum-ecc
property and it is used independent of nand-on-flash-bbt.
The move of code gets also rid of the following compiler warning:
drivers/mtd/nand/gpmi-nand/gpmi-nand.c:2274:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (of_property_read_bool(this->dev->of_node,
^~
drivers/mtd/nand/gpmi-nand/gpmi-nand.c:2278:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (of_property_read_bool(this->dev->of_node,
^~
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 138f2dc3e75a..f8c803866ce5 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -2271,10 +2271,6 @@ static int gpmi_nand_init(struct gpmi_nand_data *this) if (of_get_nand_on_flash_bbt(this->dev->of_node)) { chip->bbt_options |= NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; - if (of_property_read_bool(this->dev->of_node, - "fsl,legacy-bch-geometry")) - this->legacy_bch_geometry = true; - if (of_property_read_bool(this->dev->of_node, "fsl,no-blockmark-swap")) this->swap_block_mark = false; @@ -2282,6 +2278,10 @@ static int gpmi_nand_init(struct gpmi_nand_data *this) dev_dbg(this->dev, "Blockmark swapping %sabled\n", this->swap_block_mark ? "en" : "dis"); + if (of_property_read_bool(this->dev->of_node, + "fsl,legacy-bch-geometry")) + this->legacy_bch_geometry = true; + /* * Allocate a temporary DMA buffer for reading ID in the * nand_scan_ident(). |