mtd: do use mtd->point directly
Remove direct usage of the "mtd->point" function pointer. Instead, test the mtd_point() return code for '-EOPNOTSUPP'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
fc002e3c32
commit
10934478e4
4 changed files with 15 additions and 16 deletions
|
@ -259,6 +259,8 @@ static inline int mtd_point(struct mtd_info *mtd, loff_t from, size_t len,
|
|||
size_t *retlen, void **virt, resource_size_t *phys)
|
||||
{
|
||||
*retlen = 0;
|
||||
if (!mtd->point)
|
||||
return -EOPNOTSUPP;
|
||||
return mtd->point(mtd, from, len, retlen, virt, phys);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue