Lines Matching full:mtd

2 /* MTD-based superblock management
11 #include <linux/mtd/super.h>
23 * get a superblock on an MTD-backed filesystem
26 struct mtd_info *mtd, in mtd_get_sb() argument
33 sb = sget_dev(fc, MKDEV(MTD_BLOCK_MAJOR, mtd->index)); in mtd_get_sb()
40 mtd->index, mtd->name); in mtd_get_sb()
41 put_mtd_device(mtd); in mtd_get_sb()
45 mtd->index, mtd->name); in mtd_get_sb()
54 sb->s_mtd = mtd; in mtd_get_sb()
74 * get a superblock on an MTD-backed filesystem by MTD device number
80 struct mtd_info *mtd; in mtd_get_sb_by_nr() local
82 mtd = get_mtd_device(NULL, mtdnr); in mtd_get_sb_by_nr()
83 if (IS_ERR(mtd)) { in mtd_get_sb_by_nr()
85 return PTR_ERR(mtd); in mtd_get_sb_by_nr()
88 return mtd_get_sb(fc, mtd, fill_super); in mtd_get_sb_by_nr()
92 * get_tree_mtd - Get a superblock based on a single MTD device
112 * CONFIG_BLOCK=n - we specify the underlying MTD device by number or in get_tree_mtd()
120 struct mtd_info *mtd; in get_tree_mtd() local
122 /* mount by MTD device name */ in get_tree_mtd()
123 pr_debug("MTDSB: mtd:%%s, name \"%s\"\n", in get_tree_mtd()
126 mtd = get_mtd_device_nm(fc->source + 4); in get_tree_mtd()
127 if (!IS_ERR(mtd)) in get_tree_mtd()
128 return mtd_get_sb(fc, mtd, fill_super); in get_tree_mtd()
130 errorf(fc, "MTD: MTD device with name \"%s\" not found", in get_tree_mtd()
134 /* mount by MTD device number name */ in get_tree_mtd()
140 pr_debug("MTDSB: mtd%%d, mtdnr %d\n", mtdnr); in get_tree_mtd()
152 errorf(fc, "MTD: Couldn't look up '%s': %d", fc->source, ret); in get_tree_mtd()
163 errorf(fc, "MTD: Attempt to mount non-MTD device \"%s\"", in get_tree_mtd()
170 * destroy an MTD-based superblock