|
@@ -206,15 +206,13 @@ struct mtd_info {
|
|
size_t len);
|
|
size_t len);
|
|
int (*writev) (struct mtd_info *mtd, const struct kvec *vecs,
|
|
int (*writev) (struct mtd_info *mtd, const struct kvec *vecs,
|
|
unsigned long count, loff_t to, size_t *retlen);
|
|
unsigned long count, loff_t to, size_t *retlen);
|
|
|
|
+ void (*sync) (struct mtd_info *mtd);
|
|
|
|
|
|
/* Backing device capabilities for this device
|
|
/* Backing device capabilities for this device
|
|
* - provides mmap capabilities
|
|
* - provides mmap capabilities
|
|
*/
|
|
*/
|
|
struct backing_dev_info *backing_dev_info;
|
|
struct backing_dev_info *backing_dev_info;
|
|
|
|
|
|
- /* Sync */
|
|
|
|
- void (*sync) (struct mtd_info *mtd);
|
|
|
|
-
|
|
|
|
/* Chip-supported device locking */
|
|
/* Chip-supported device locking */
|
|
int (*lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
|
|
int (*lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
|
|
int (*unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
|
|
int (*unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
|
|
@@ -381,6 +379,11 @@ static inline int mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
|
|
return mtd->writev(mtd, vecs, count, to, retlen);
|
|
return mtd->writev(mtd, vecs, count, to, retlen);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline void mtd_sync(struct mtd_info *mtd)
|
|
|
|
+{
|
|
|
|
+ mtd->sync(mtd);
|
|
|
|
+}
|
|
|
|
+
|
|
static inline struct mtd_info *dev_to_mtd(struct device *dev)
|
|
static inline struct mtd_info *dev_to_mtd(struct device *dev)
|
|
{
|
|
{
|
|
return dev ? dev_get_drvdata(dev) : NULL;
|
|
return dev ? dev_get_drvdata(dev) : NULL;
|