mtd: nand: omap2: Add check for old elm binding

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Jul 13 10:59:02 PDT 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=3bbca2c54f86f79c570c00c6afb0611d88af41e0
Commit:     3bbca2c54f86f79c570c00c6afb0611d88af41e0
Parent:     becc7ae544c61395b5eba7b9913e14aa567ca07a
Author:     Teresa Remmet <t.remmet at phytec.de>
AuthorDate: Tue Jul 5 11:32:30 2016 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Jul 13 10:09:54 2016 -0700

    mtd: nand: omap2: Add check for old elm binding
    
    commit c9711ec5250b ("mtd: nand: omap: Clean up device tree support")
    removes the check for the old elm phandle binding.
    Add it again to keep backward compatibility.
    
    Fixes: commit c9711ec5250b ("mtd: nand: omap: Clean up device tree support")
    Signed-off-by: Teresa Remmet <t.remmet at phytec.de>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/omap2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 08e1588..d788663 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1658,7 +1658,9 @@ static int omap_get_dt_info(struct device *dev, struct omap_nand_info *info)
 	/* detect availability of ELM module. Won't be present pre-OMAP4 */
 	info->elm_of_node = of_parse_phandle(child, "ti,elm-id", 0);
 	if (!info->elm_of_node)
-		dev_dbg(dev, "ti,elm-id not in DT\n");
+		info->elm_of_node = of_parse_phandle(child, "elm_id", 0);
+		if (!info->elm_of_node)
+			dev_dbg(dev, "ti,elm-id not in DT\n");
 
 	/* select ecc-scheme for NAND */
 	if (of_property_read_string(child, "ti,nand-ecc-opt", &s)) {



More information about the linux-mtd-cvs mailing list