Lines Matching full:part

37 	WARN_ON(!list_empty(&mtd->part.node));  in release_mtd_partition()
42 const struct mtd_partition *part, in allocate_partition() argument
49 parent->part.size : parent->size; in allocate_partition()
57 name = kstrdup(part->name, GFP_KERNEL); in allocate_partition()
68 child->part.flags = parent->flags & ~part->mask_flags; in allocate_partition()
69 child->part.flags |= part->add_flags; in allocate_partition()
70 child->flags = child->part.flags; in allocate_partition()
71 child->part.size = part->size; in allocate_partition()
91 child->dev.of_node = part->of_node; in allocate_partition()
93 child->part.offset = part->offset; in allocate_partition()
96 if (child->part.offset == MTDPART_OFS_APPEND) in allocate_partition()
97 child->part.offset = cur_offset; in allocate_partition()
98 if (child->part.offset == MTDPART_OFS_NXTBLK) { in allocate_partition()
100 child->part.offset = cur_offset; in allocate_partition()
103 child->part.offset += wr_alignment - remainder; in allocate_partition()
107 child->part.offset); in allocate_partition()
110 if (child->part.offset == MTDPART_OFS_RETAIN) { in allocate_partition()
111 child->part.offset = cur_offset; in allocate_partition()
112 if (parent_size - child->part.offset >= child->part.size) { in allocate_partition()
113 child->part.size = parent_size - child->part.offset - in allocate_partition()
114 child->part.size; in allocate_partition()
117 part->name, parent_size - child->part.offset, in allocate_partition()
118 child->part.size); in allocate_partition()
123 if (child->part.size == MTDPART_SIZ_FULL) in allocate_partition()
124 child->part.size = parent_size - child->part.offset; in allocate_partition()
127 child->part.offset, child->part.offset + child->part.size, in allocate_partition()
131 if (child->part.offset >= parent_size) { in allocate_partition()
133 child->part.offset = 0; in allocate_partition()
134 child->part.size = 0; in allocate_partition()
139 part->name); in allocate_partition()
142 if (child->part.offset + child->part.size > parent->size) { in allocate_partition()
143 child->part.size = parent_size - child->part.offset; in allocate_partition()
145 part->name, parent->name, child->part.size); in allocate_partition()
151 u64 end = child->part.offset + child->part.size; in allocate_partition()
154 /* Find the first erase regions which is part of this in allocate_partition()
156 for (i = 0; i < max && regions[i].offset <= child->part.offset; in allocate_partition()
190 part->name); in allocate_partition()
193 tmp = mtd_get_master_ofs(child, 0) + child->part.size; in allocate_partition()
198 part->name); in allocate_partition()
201 child->size = child->part.size; in allocate_partition()
209 while (offs < child->part.size) { in allocate_partition()
227 return sysfs_emit(buf, "%lld\n", mtd->part.offset); in offset_show()
250 parent->part.size : parent->size; in mtd_add_partition()
251 struct mtd_partition part; in mtd_add_partition() local
266 memset(&part, 0, sizeof(part)); in mtd_add_partition()
267 part.name = name; in mtd_add_partition()
268 part.size = length; in mtd_add_partition()
269 part.offset = offset; in mtd_add_partition()
271 child = allocate_partition(parent, &part, -1, offset); in mtd_add_partition()
276 list_add_tail(&child->part.node, &parent->partitions); in mtd_add_partition()
289 list_del(&child->part.node); in mtd_add_partition()
310 list_for_each_entry_safe(child, next, &mtd->partitions, part.node) { in __mtd_del_partition()
318 list_del_init(&mtd->part.node); in __mtd_del_partition()
335 list_for_each_entry_safe(child, next, &mtd->partitions, part.node) { in __del_mtd_partitions()
340 list_del_init(&child->part.node); in __del_mtd_partitions()
373 list_for_each_entry(child, &mtd->partitions, part.node) { in mtd_del_partition()
413 list_add_tail(&child->part.node, &parent->partitions); in add_mtd_partitions()
419 list_del(&child->part.node); in add_mtd_partitions()
435 cur_offset = child->part.offset + child->part.size; in add_mtd_partitions()