Lines Matching full:parts

23  * <size> and <offset> can be specified such that the parts are out of order
26 * The parts are assigned MTD numbers in the order they are specified in the
55 struct mtd_partition *parts; member
81 struct mtd_partition *parts; in newpart() local
161 parts = newpart(s + 1, &s, num_parts, this_part + 1, in newpart()
163 if (IS_ERR(parts)) in newpart()
164 return parts; in newpart()
173 parts = kzalloc(alloc_size, GFP_KERNEL); in newpart()
174 if (!parts) in newpart()
176 extra_mem = (unsigned char *)(parts + *num_parts); in newpart()
183 parts[this_part].size = size; in newpart()
184 parts[this_part].offset = offset; in newpart()
185 parts[this_part].mask_flags = mask_flags; in newpart()
186 parts[this_part].add_flags = add_flags; in newpart()
191 parts[this_part].name = extra_mem; in newpart()
195 this_part, parts[this_part].name, parts[this_part].offset, in newpart()
196 parts[this_part].size, parts[this_part].mask_flags); in newpart()
206 return parts; in newpart()
219 struct mtd_partition *parts; in mtdpart_setup_real() local
268 parts = newpart(p + 1, /* cmdline */ in mtdpart_setup_real()
270 &num_parts, /* out: number of parts */ in mtdpart_setup_real()
275 if (IS_ERR(parts)) { in mtdpart_setup_real()
283 return PTR_ERR(parts); in mtdpart_setup_real()
290 this_mtd->parts = parts; in mtdpart_setup_real()
354 if (part->parts[i].offset == OFFSET_CONTINUOUS) in parse_cmdline_partitions()
355 part->parts[i].offset = offset; in parse_cmdline_partitions()
357 offset = part->parts[i].offset; in parse_cmdline_partitions()
359 if (part->parts[i].size == SIZE_REMAINING) in parse_cmdline_partitions()
360 part->parts[i].size = master->size - offset; in parse_cmdline_partitions()
362 if (offset + part->parts[i].size > master->size) { in parse_cmdline_partitions()
365 part->parts[i].size = master->size - offset; in parse_cmdline_partitions()
367 offset += part->parts[i].size; in parse_cmdline_partitions()
369 if (part->parts[i].size == 0) { in parse_cmdline_partitions()
373 memmove(&part->parts[i], &part->parts[i + 1], in parse_cmdline_partitions()
374 sizeof(*part->parts) * (part->num_parts - i)); in parse_cmdline_partitions()
379 *pparts = kmemdup(part->parts, sizeof(*part->parts) * part->num_parts, in parse_cmdline_partitions()