Lines Matching refs:parent

41 static struct mtd_info *allocate_partition(struct mtd_info *parent,
45 struct mtd_info *master = mtd_get_master(parent);
46 int wr_alignment = (parent->flags & MTD_NO_ERASE) ?
48 u64 parent_size = mtd_is_partition(parent) ?
49 parent->part.size : parent->size;
60 parent->name);
67 child->type = parent->type;
68 child->part.flags = parent->flags & ~part->mask_flags;
72 child->writesize = parent->writesize;
73 child->writebufsize = parent->writebufsize;
74 child->oobsize = parent->oobsize;
75 child->oobavail = parent->oobavail;
76 child->subpage_sft = parent->subpage_sft;
79 child->owner = parent->owner;
86 * parent conditional on that option. Note, this is a way to
87 * distinguish between the parent and its partitions in sysfs.
89 child->dev.parent = IS_ENABLED(CONFIG_MTD_PARTITIONED_MASTER) || mtd_is_partition(parent) ?
90 &parent->dev : parent->dev.parent;
92 child->parent = parent;
137 child->erasesize = parent->erasesize;
142 if (child->part.offset + child->part.size > parent->size) {
145 part->name, parent->name, child->part.size);
148 if (parent->numeraseregions > 1) {
150 int i, max = parent->numeraseregions;
152 struct mtd_erase_region_info *regions = parent->eraseregions;
175 * Child erasesize might differ from the parent one if the parent
202 child->ecc_step_size = parent->ecc_step_size;
203 child->ecc_strength = parent->ecc_strength;
204 child->bitflip_threshold = parent->bitflip_threshold;
245 int mtd_add_partition(struct mtd_info *parent, const char *name,
248 struct mtd_info *master = mtd_get_master(parent);
249 u64 parent_size = mtd_is_partition(parent) ?
250 parent->part.size : parent->size;
271 child = allocate_partition(parent, &part, -1, offset);
276 list_add_tail(&child->part.node, &parent->partitions);
386 * This function, given a parent MTD object and a partition table, creates
387 * and registers the child MTD objects which are bound to the parent according
390 * For historical reasons, this function's caller only registers the parent
394 int add_mtd_partitions(struct mtd_info *parent,
398 struct mtd_info *child, *master = mtd_get_master(parent);
403 nbparts, parent->name);
406 child = allocate_partition(parent, parts + i, i, cur_offset);
413 list_add_tail(&child->part.node, &parent->partitions);
589 /* Use parent device (controller) if the top level MTD is not registered */
591 dev = master->dev.parent;