Lines Matching refs:partitions
289 struct mtd_partition partitions[CONFIG_NANDSIM_MAX_PARTS]; member
697 if (parts_num > ARRAY_SIZE(ns->partitions)) { in ns_init()
710 ns->partitions[i].name = ns_get_partition_name(i); in ns_init()
711 if (!ns->partitions[i].name) { in ns_init()
715 ns->partitions[i].offset = next_offset; in ns_init()
716 ns->partitions[i].size = part_sz; in ns_init()
717 next_offset += ns->partitions[i].size; in ns_init()
718 remains -= ns->partitions[i].size; in ns_init()
722 if (parts_num + 1 > ARRAY_SIZE(ns->partitions)) { in ns_init()
727 ns->partitions[i].name = ns_get_partition_name(i); in ns_init()
728 if (!ns->partitions[i].name) { in ns_init()
733 ns->partitions[i].offset = next_offset; in ns_init()
734 ns->partitions[i].size = remains; in ns_init()
777 for (i = 0; i < ARRAY_SIZE(ns->partitions); ++i) in ns_init()
778 kfree(ns->partitions[i].name); in ns_init()
790 for (i = 0; i < ARRAY_SIZE(ns->partitions); ++i) in ns_free()
791 kfree(ns->partitions[i].name); in ns_free()
2378 ret = mtd_device_register(nsmtd, &ns->partitions[0], ns->nbparts); in ns_init_module()