summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2017-08-23 17:24:46 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-12-09 23:11:16 +0100
commit6db9d6dcb31401d4aa005cd8d3c9643c34199a42 (patch)
treeb59663a3abb562e7f21eacef0599dda39f79e410
parent5018d429953d83090a11482eff009b320356be05 (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> (cherry picked from commit c8f0033be80ccb23230b6b572c328d1c02e4ad04)
-rw-r--r--drivers/mtd/nand/gpmi-nand/gpmi-nand.c8
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 64e9309eebce..4f0e6d83ec0b 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -2325,14 +2325,14 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
if (of_property_read_bool(this->dev->of_node,
"fsl,no-blockmark-swap"))
this->swap_block_mark = false;
-
- if (of_property_read_bool(this->dev->of_node,
- "fsl,legacy-bch-geometry"))
- this->legacy_bch_geometry = true;
}
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;
+
ret = gpmi_init_last(this);
if (ret)
goto err_out;