Lines Matching refs:mtd
8 #include <linux/mtd/mtd.h>
9 #include <linux/mtd/partitions.h>
21 static void *mtd_parser_tplink_safeloader_read_table(struct mtd_info *mtd)
31 np = mtd_get_of_node(mtd);
32 if (mtd_is_partition(mtd))
42 err = mtd_read(mtd, offset, sizeof(hdr), &bytes_read, (uint8_t *)&hdr);
44 pr_err("Failed to read from %s at 0x%x\n", mtd->name, offset);
54 err = mtd_read(mtd, offset + sizeof(hdr), size, &bytes_read, buf);
56 pr_err("Failed to read from %s at 0x%zx\n", mtd->name, offset + sizeof(hdr));
73 static int mtd_parser_tplink_safeloader_parse(struct mtd_info *mtd,
91 buf = mtd_parser_tplink_safeloader_read_table(mtd);