diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-23 19:21:16 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 18:25:42 +0000 |
commit | e95e9786455c11c8eac30d76e5289d4e40187f9a (patch) | |
tree | 6e6023478b39037d935d180d6fc3903bf4235165 /include/linux/mtd | |
parent | b66005cd3e6f104e0a1b6492110c337269b53ec3 (diff) | |
download | op-kernel-dev-e95e9786455c11c8eac30d76e5289d4e40187f9a.zip op-kernel-dev-e95e9786455c11c8eac30d76e5289d4e40187f9a.tar.gz |
mtd: introduce mtd_is_locked interface
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/mtd.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index f30c358..8b99019 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -209,14 +209,13 @@ struct mtd_info { void (*sync) (struct mtd_info *mtd); 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 (*is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); /* Backing device capabilities for this device * - provides mmap capabilities */ struct backing_dev_info *backing_dev_info; - int (*is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len); - /* Power Management functions */ int (*suspend) (struct mtd_info *mtd); void (*resume) (struct mtd_info *mtd); @@ -394,6 +393,11 @@ static inline int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) return mtd->unlock(mtd, ofs, len); } +static inline int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) +{ + return mtd->is_locked(mtd, ofs, len); +} + static inline struct mtd_info *dev_to_mtd(struct device *dev) { return dev ? dev_get_drvdata(dev) : NULL; |