mtd: return error code from mtd_unpoint
The 'mtd_unpoint()' API function should be able to return an error code because it may fail if you specify incorrect offset. This patch changes this MTD API function and amends all the drivers correspondingly. Also return '-EOPNOTSUPP' from 'mtd_unpoint()' when the '->unpoint()' method is undefined. We do not really need this currently, but this just makes sense to be consistent with 'mtd_point()'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
这个提交包含在:
@@ -60,8 +60,9 @@ static int ram_point(struct mtd_info *mtd, loff_t from, size_t len,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
|
||||
static int ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
在新工单中引用
屏蔽一个用户