diff options
author | Tom Rini <trini@konsulko.com> | 2018-10-02 13:02:22 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-10-02 17:01:46 -0400 |
commit | 592cd5defd4f71d34ffcbd8dd3326bc10f662e20 (patch) | |
tree | 0824c4d2c60d79b7be18ba82209d899e4d4f8c34 /include/linux/mtd/partitions.h | |
parent | 2ba8bf207481cfb319f54a1bef67f6f068831a58 (diff) | |
parent | b3bec2525604d6b42bb9e7fd719c84b022447db3 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-spi
This is the PR for SPI-NAND changes along with few spi changes.
[trini: Re-sync changes for ls1012afrwy_qspi*_defconfig]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/linux/mtd/partitions.h')
-rw-r--r-- | include/linux/mtd/partitions.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index ce0e8dbee4..3822237f2a 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h @@ -81,10 +81,30 @@ extern void register_mtd_parser(struct mtd_part_parser *parser); extern void deregister_mtd_parser(struct mtd_part_parser *parser); #endif -int mtd_is_partition(const struct mtd_info *mtd); int mtd_add_partition(struct mtd_info *master, const char *name, long long offset, long long length); int mtd_del_partition(struct mtd_info *master, int partno); uint64_t mtd_get_device_size(const struct mtd_info *mtd); +#if defined(CONFIG_MTD_PARTITIONS) +int mtd_parse_partitions(struct mtd_info *parent, const char **_mtdparts, + struct mtd_partition **_parts, int *_nparts); +void mtd_free_parsed_partitions(struct mtd_partition *parts, + unsigned int nparts); +#else +static inline int +mtd_parse_partitions(struct mtd_info *parent, const char **_mtdparts, + struct mtd_partition **_parts, int *_nparts) +{ + *_nparts = 0; + + return 0; +} +static inline void +mtd_free_parsed_partitions(struct mtd_partition *parts, unsigned int nparts) +{ + return; +} +#endif /* defined(MTD_PARTITIONS) */ + #endif |