#include <linux/ctype.h>
#include <linux/module.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/slab.h>
#include <linux/soc/qcom/smem.h>
#define SMEM_AARM_PARTITION_TABLE …
#define SMEM_APPS …
#define SMEM_FLASH_PART_MAGIC1 …
#define SMEM_FLASH_PART_MAGIC2 …
#define SMEM_FLASH_PTABLE_V3 …
#define SMEM_FLASH_PTABLE_V4 …
#define SMEM_FLASH_PTABLE_MAX_PARTS_V3 …
#define SMEM_FLASH_PTABLE_MAX_PARTS_V4 …
#define SMEM_FLASH_PTABLE_HDR_LEN …
#define SMEM_FLASH_PTABLE_NAME_SIZE …
struct smem_flash_pentry { … } __packed __aligned(…);
struct smem_flash_ptable { … } __packed __aligned(…);
static int parse_qcomsmem_part(struct mtd_info *mtd,
const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{ … }
static void parse_qcomsmem_cleanup(const struct mtd_partition *pparts,
int nr_parts)
{ … }
static const struct of_device_id qcomsmem_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, qcomsmem_of_match_table);
static struct mtd_part_parser mtd_parser_qcomsmem = …;
module_mtd_part_parser(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;