mtdpart.c (d26c87d64eff271146b40b66c7de8cfeaf956707) | mtdpart.c (3165f44bcd4b987cbcc694af739ab955b561e05b) |
---|---|
1/* 2 * Simple MTD partitioning layer 3 * 4 * Copyright © 2000 Nicolas Pitre <nico@fluxnic.net> 5 * Copyright © 2002 Thomas Gleixner <gleixner@linutronix.de> 6 * Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 764 unchanged lines hidden (view full) --- 773 if (ret > 0) { 774 printk(KERN_NOTICE "%d %s partitions found on MTD device %s\n", 775 ret, parser->name, master->name); 776 } 777 put_partition_parser(parser); 778 } 779 return ret; 780} | 1/* 2 * Simple MTD partitioning layer 3 * 4 * Copyright © 2000 Nicolas Pitre <nico@fluxnic.net> 5 * Copyright © 2002 Thomas Gleixner <gleixner@linutronix.de> 6 * Copyright © 2000-2010 David Woodhouse <dwmw2@infradead.org> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 764 unchanged lines hidden (view full) --- 773 if (ret > 0) { 774 printk(KERN_NOTICE "%d %s partitions found on MTD device %s\n", 775 ret, parser->name, master->name); 776 } 777 put_partition_parser(parser); 778 } 779 return ret; 780} |
781EXPORT_SYMBOL_GPL(parse_mtd_partitions); | |
782 783int mtd_is_partition(struct mtd_info *mtd) 784{ 785 struct mtd_part *part; 786 int ispart = 0; 787 788 mutex_lock(&mtd_partitions_mutex); 789 list_for_each_entry(part, &mtd_partitions, list) 790 if (&part->mtd == mtd) { 791 ispart = 1; 792 break; 793 } 794 mutex_unlock(&mtd_partitions_mutex); 795 796 return ispart; 797} 798EXPORT_SYMBOL_GPL(mtd_is_partition); | 781 782int mtd_is_partition(struct mtd_info *mtd) 783{ 784 struct mtd_part *part; 785 int ispart = 0; 786 787 mutex_lock(&mtd_partitions_mutex); 788 list_for_each_entry(part, &mtd_partitions, list) 789 if (&part->mtd == mtd) { 790 ispart = 1; 791 break; 792 } 793 mutex_unlock(&mtd_partitions_mutex); 794 795 return ispart; 796} 797EXPORT_SYMBOL_GPL(mtd_is_partition); |