memset(cfg, 0, sizeof(*cfg));
- ret = of_property_read_u32(chip->flash_node,
+ ret = of_property_read_u32(nand_get_flash_node(chip),
"brcm,nand-oob-sector-size",
&oob_sector);
if (ret) {
struct nand_flash_dev *type;
int ret;
- if (chip->flash_node) {
+ if (nand_get_flash_node(chip)) {
/* MTD can automatically handle DT partitions, etc. */
- mtd_set_of_node(mtd, chip->flash_node);
+ mtd_set_of_node(mtd, nand_get_flash_node(chip));
- ret = nand_dt_init(mtd, chip, chip->flash_node);
+ ret = nand_dt_init(mtd, chip, nand_get_flash_node(chip));
if (ret)
return ret;
}
for_each_available_child_of_node(nfc->dev->of_node, child) {
if (of_device_is_compatible(child, "fsl,vf610-nfc-nandcs")) {
- if (chip->flash_node) {
+ if (nand_get_flash_node(chip)) {
dev_err(nfc->dev,
"Only one NAND chip supported!\n");
err = -EINVAL;
}
}
- if (!chip->flash_node) {
+ if (!nand_get_flash_node(chip)) {
dev_err(nfc->dev, "NAND chip sub-node missing!\n");
err = -ENODEV;
goto err_clk;
return mtd_device_register(mtd, NULL, 0);
error:
- of_node_put(chip->flash_node);
+ of_node_put(nand_get_flash_node(chip));
err_clk:
clk_disable_unprepare(nfc->clk);
return err;