]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
memory: atmel-ebi: Fix the test to enable generic SMC logic
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 27 Jan 2017 09:10:36 +0000 (10:10 +0100)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fri, 27 Jan 2017 09:15:56 +0000 (10:15 +0100)
We should test the apply value and not the ret one here.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: 6a4ec4cd0888 ("memory: add Atmel EBI (External Bus Interface) driver")
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/memory/atmel-ebi.c

index 1eaaa2be8ff26decc85e8ffb592eb2e853b17eb0..2c4c9a1978bc862381a3aca5e4694708345b05da 100644 (file)
@@ -503,7 +503,7 @@ static int at91_ebi_dev_setup(struct at91_ebi *ebi, struct device_node *np,
                 * Attach the EBI device to the generic SMC logic if at least
                 * one "atmel,smc-" property is present.
                 */
-               if (ebi->ebi_csa && ret)
+               if (ebi->ebi_csa && apply)
                        regmap_field_update_bits(ebi->ebi_csa,
                                                 BIT(cs), 0);
        }