diff options
| author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-29 03:45:04 -0500 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:26:18 -0500 |
| commit | e2936b2af5562c8c66060e2bc2ae2e209d0acd3d (patch) | |
| tree | 99af09f8049f9fd76abca6d630ff333b169ab25f /include/linux/mtd | |
| parent | 27c151a5e52efaa46d0938984f2ef591bdcb6d5b (diff) | |
mtd: do not use mtd->lock_user_prot_reg directly
Instead, check the -EOPNOTSUPP return code of 'mtd_lock_user_prot_reg()'.
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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 7cd56d2b9419..a994129ede55 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
| @@ -389,6 +389,8 @@ static inline int mtd_write_user_prot_reg(struct mtd_info *mtd, loff_t to, | |||
| 389 | static inline int mtd_lock_user_prot_reg(struct mtd_info *mtd, loff_t from, | 389 | static inline int mtd_lock_user_prot_reg(struct mtd_info *mtd, loff_t from, |
| 390 | size_t len) | 390 | size_t len) |
| 391 | { | 391 | { |
| 392 | if (!mtd->lock_user_prot_reg) | ||
| 393 | return -EOPNOTSUPP; | ||
| 392 | return mtd->lock_user_prot_reg(mtd, from, len); | 394 | return mtd->lock_user_prot_reg(mtd, from, len); |
| 393 | } | 395 | } |
| 394 | 396 | ||
