From: John Jacques <[email protected]>

Signed-off-by: John Jacques <[email protected]>
Signed-off-by: Bruce Ashfield <[email protected]>
---
 drivers/mtd/nand/lsi_acp_nand.c |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/mtd/nand/lsi_acp_nand.c b/drivers/mtd/nand/lsi_acp_nand.c
index 07c521e..2a84b96 100644
--- a/drivers/mtd/nand/lsi_acp_nand.c
+++ b/drivers/mtd/nand/lsi_acp_nand.c
@@ -3521,23 +3521,17 @@ lsi_nand_init(void)
          The ECC status register and mask are different on 344x, 342x, 35xx...
        */
 
-       np = of_find_compatible_node(NULL, NULL, "lsi,acp3500");
-
-       if (NULL != np) {
+       if (of_machine_is_compatible("lsi,acp3500")) {
                pecc_busy_register = (gpreg_base + 0x8c);
                pecc_busy_mask = (1 << 20);
        } else {
-               np = of_find_compatible_node(NULL, NULL, "lsi,acp3420");
-
-               if (NULL != np) {
+               if (of_machine_is_compatible("lsi,acp3420")) {
                        pecc_busy_register = (gpreg_base + 0xc);
                        pecc_busy_mask = (1 << 28);
                } else {
-                       np = of_find_compatible_node(NULL, NULL, "lsi,acp3440");
-
-                       if (NULL != np) {
+                       if (of_machine_is_compatible("lsi,acp3440")) {
                                pecc_busy_register = (gpreg_base + 0xc);
-                               pecc_busy_mask = (1 << 25);
+                               pecc_busy_mask = (1 << 28);
                        } else {
                                printk(KERN_ERR "Unsupported NAND Target\n");
 
-- 
1.7.9.5

-- 
_______________________________________________
linux-yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to