diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2017-08-23 17:24:46 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-12-24 01:27:29 +0100 |
commit | 5bdcc692cd81d438bed13f06a659a4a0245a211d (patch) | |
tree | 8f4de1f84fcf82710433a85957f421ec0725a72f /drivers | |
parent | 5cb5d3bdac76a88e2d546a89f5c74436a70b887b (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)
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 9446a1f9a539..bea204284cd5 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -2338,14 +2338,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; |