Lines Matching refs:master
45 struct mtd_info *master = mtd_get_master(parent); in allocate_partition() local
47 master->writesize : master->erasesize; in allocate_partition()
171 child->erasesize = master->erasesize; in allocate_partition()
206 if (master->_block_isbad) { in allocate_partition()
248 struct mtd_info *master = mtd_get_master(parent); in mtd_add_partition() local
275 mutex_lock(&master->master.partitions_lock); in mtd_add_partition()
277 mutex_unlock(&master->master.partitions_lock); in mtd_add_partition()
288 mutex_lock(&master->master.partitions_lock); in mtd_add_partition()
290 mutex_unlock(&master->master.partitions_lock); in mtd_add_partition()
355 struct mtd_info *master = mtd_get_master(mtd); in del_mtd_partitions() local
360 mutex_lock(&master->master.partitions_lock); in del_mtd_partitions()
362 mutex_unlock(&master->master.partitions_lock); in del_mtd_partitions()
369 struct mtd_info *child, *master = mtd_get_master(mtd); in mtd_del_partition() local
372 mutex_lock(&master->master.partitions_lock); in mtd_del_partition()
379 mutex_unlock(&master->master.partitions_lock); in mtd_del_partition()
398 struct mtd_info *child, *master = mtd_get_master(parent); in add_mtd_partitions() local
412 mutex_lock(&master->master.partitions_lock); in add_mtd_partitions()
414 mutex_unlock(&master->master.partitions_lock); in add_mtd_partitions()
418 mutex_lock(&master->master.partitions_lock); in add_mtd_partitions()
420 mutex_unlock(&master->master.partitions_lock); in add_mtd_partitions()
437 del_mtd_partitions(master); in add_mtd_partitions()
517 struct mtd_info *master, in mtd_part_do_parse() argument
523 ret = (*parser->parse_fn)(master, &pparts->parts, data); in mtd_part_do_parse()
524 pr_debug("%s: parser %s: %i\n", master->name, parser->name, ret); in mtd_part_do_parse()
529 parser->name, master->name); in mtd_part_do_parse()
576 static int mtd_part_of_parse(struct mtd_info *master, in mtd_part_of_parse() argument
588 dev = &master->dev; in mtd_part_of_parse()
590 if (!IS_ENABLED(CONFIG_MTD_PARTITIONED_MASTER) && !mtd_is_partition(master)) in mtd_part_of_parse()
591 dev = master->dev.parent; in mtd_part_of_parse()
593 np = mtd_get_of_node(master); in mtd_part_of_parse()
594 if (mtd_is_partition(master)) in mtd_part_of_parse()
612 ret = mtd_part_do_parse(parser, master, pparts, NULL); in mtd_part_of_parse()
635 ret = mtd_part_do_parse(parser, master, pparts, NULL); in mtd_part_of_parse()
664 int parse_mtd_partitions(struct mtd_info *master, const char *const *types, in parse_mtd_partitions() argument
672 types = mtd_is_partition(master) ? default_subpartition_types : in parse_mtd_partitions()
682 ret = mtd_part_of_parse(master, &pparts); in parse_mtd_partitions()
684 pr_debug("%s: parsing partitions %s\n", master->name, in parse_mtd_partitions()
689 pr_debug("%s: got parser %s\n", master->name, in parse_mtd_partitions()
693 ret = mtd_part_do_parse(parser, master, &pparts, data); in parse_mtd_partitions()
699 err = add_mtd_partitions(master, pparts.parts, in parse_mtd_partitions()
733 struct mtd_info *master = mtd_get_master((struct mtd_info *)mtd); in mtd_get_device_size() local
735 return master->size; in mtd_get_device_size()