aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/atmel/nand-controller.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-11-24 20:01:43 -0500
committerDavid S. Miller <davem@davemloft.net>2018-11-24 20:01:43 -0500
commitb1bf78bfb2e4c9ffa03ccdbc60d89a2f7c5fd82c (patch)
treefcd93c3f54a72ca6a6ee97f015efebe6d80a3271 /drivers/mtd/nand/raw/atmel/nand-controller.c
parentaea0a897af9e44c258e8ab9296fad417f1bc063a (diff)
parentd146194f31c96f9b260c5a1cf1592d2e7f82a2e2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/mtd/nand/raw/atmel/nand-controller.c')
-rw-r--r--drivers/mtd/nand/raw/atmel/nand-controller.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index fb33f6be7c4f..ad720494e8f7 100644
--- a/drivers/mtd/nand/raw/atmel/nand-controller.c
+++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
@@ -2032,8 +2032,7 @@ atmel_hsmc_nand_controller_legacy_init(struct atmel_hsmc_nand_controller *nc)
2032 int ret; 2032 int ret;
2033 2033
2034 nand_np = dev->of_node; 2034 nand_np = dev->of_node;
2035 nfc_np = of_find_compatible_node(dev->of_node, NULL, 2035 nfc_np = of_get_compatible_child(dev->of_node, "atmel,sama5d3-nfc");
2036 "atmel,sama5d3-nfc");
2037 if (!nfc_np) { 2036 if (!nfc_np) {
2038 dev_err(dev, "Could not find device node for sama5d3-nfc\n"); 2037 dev_err(dev, "Could not find device node for sama5d3-nfc\n");
2039 return -ENODEV; 2038 return -ENODEV;
@@ -2447,15 +2446,19 @@ static int atmel_nand_controller_probe(struct platform_device *pdev)
2447 } 2446 }
2448 2447
2449 if (caps->legacy_of_bindings) { 2448 if (caps->legacy_of_bindings) {
2449 struct device_node *nfc_node;
2450 u32 ale_offs = 21; 2450 u32 ale_offs = 21;
2451 2451
2452 /* 2452 /*
2453 * If we are parsing legacy DT props and the DT contains a 2453 * If we are parsing legacy DT props and the DT contains a
2454 * valid NFC node, forward the request to the sama5 logic. 2454 * valid NFC node, forward the request to the sama5 logic.
2455 */ 2455 */
2456 if (of_find_compatible_node(pdev->dev.of_node, NULL, 2456 nfc_node = of_get_compatible_child(pdev->dev.of_node,
2457 "atmel,sama5d3-nfc")) 2457 "atmel,sama5d3-nfc");
2458 if (nfc_node) {
2458 caps = &atmel_sama5_nand_caps; 2459 caps = &atmel_sama5_nand_caps;
2460 of_node_put(nfc_node);
2461 }
2459 2462
2460 /* 2463 /*
2461 * Even if the compatible says we are dealing with an 2464 * Even if the compatible says we are dealing with an