Loading drivers/mtd/nand/ndfc.c +3 −8 Original line number Original line Diff line number Diff line Loading @@ -161,6 +161,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc, { { struct device_node *flash_np; struct device_node *flash_np; struct nand_chip *chip = &ndfc->chip; struct nand_chip *chip = &ndfc->chip; struct mtd_part_parser_data ppdata; int ret; int ret; chip->IO_ADDR_R = ndfc->ndfcbase + NDFC_DATA; chip->IO_ADDR_R = ndfc->ndfcbase + NDFC_DATA; Loading Loading @@ -188,6 +189,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc, if (!flash_np) if (!flash_np) return -ENODEV; return -ENODEV; ppdata->of_node = flash_np; ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s", ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s", dev_name(&ndfc->ofdev->dev), flash_np->name); dev_name(&ndfc->ofdev->dev), flash_np->name); if (!ndfc->mtd.name) { if (!ndfc->mtd.name) { Loading @@ -199,17 +201,10 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc, if (ret) if (ret) goto err; goto err; ret = parse_mtd_partitions(&ndfc->mtd, NULL, &ndfc->parts, 0); ret = parse_mtd_partitions(&ndfc->mtd, NULL, &ndfc->parts, &ppdata); if (ret < 0) if (ret < 0) goto err; goto err; if (ret == 0) { ret = of_mtd_parse_partitions(&ndfc->ofdev->dev, flash_np, &ndfc->parts); if (ret < 0) goto err; } ret = mtd_device_register(&ndfc->mtd, ndfc->parts, ret); ret = mtd_device_register(&ndfc->mtd, ndfc->parts, ret); err: err: Loading Loading
drivers/mtd/nand/ndfc.c +3 −8 Original line number Original line Diff line number Diff line Loading @@ -161,6 +161,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc, { { struct device_node *flash_np; struct device_node *flash_np; struct nand_chip *chip = &ndfc->chip; struct nand_chip *chip = &ndfc->chip; struct mtd_part_parser_data ppdata; int ret; int ret; chip->IO_ADDR_R = ndfc->ndfcbase + NDFC_DATA; chip->IO_ADDR_R = ndfc->ndfcbase + NDFC_DATA; Loading Loading @@ -188,6 +189,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc, if (!flash_np) if (!flash_np) return -ENODEV; return -ENODEV; ppdata->of_node = flash_np; ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s", ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s", dev_name(&ndfc->ofdev->dev), flash_np->name); dev_name(&ndfc->ofdev->dev), flash_np->name); if (!ndfc->mtd.name) { if (!ndfc->mtd.name) { Loading @@ -199,17 +201,10 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc, if (ret) if (ret) goto err; goto err; ret = parse_mtd_partitions(&ndfc->mtd, NULL, &ndfc->parts, 0); ret = parse_mtd_partitions(&ndfc->mtd, NULL, &ndfc->parts, &ppdata); if (ret < 0) if (ret < 0) goto err; goto err; if (ret == 0) { ret = of_mtd_parse_partitions(&ndfc->ofdev->dev, flash_np, &ndfc->parts); if (ret < 0) goto err; } ret = mtd_device_register(&ndfc->mtd, ndfc->parts, ret); ret = mtd_device_register(&ndfc->mtd, ndfc->parts, ret); err: err: Loading