diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-30 07:31:57 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:26:10 -0500 |
commit | cd621274b0ec747db8dedbf857624c067f481976 (patch) | |
tree | 1d86dd22d4133fc45311168d1b012e8103b4f875 /drivers/mtd/mtdconcat.c | |
parent | 10934478e44d9a5a7b16dadd89094fb608cf101e (diff) |
mtd: do not use mtd->get_unmapped_area directly
Remove direct usage of mtd->get_unmapped_area. Instead, just call
'mtd_get_unmapped_area()' which will return -EOPNOTSUPP if the function
is not implemented and test for this error code.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdconcat.c')
-rw-r--r-- | drivers/mtd/mtdconcat.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index f694b51e785..9119f76f87f 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c | |||
@@ -726,11 +726,7 @@ static unsigned long concat_get_unmapped_area(struct mtd_info *mtd, | |||
726 | if (offset + len > subdev->size) | 726 | if (offset + len > subdev->size) |
727 | return (unsigned long) -EINVAL; | 727 | return (unsigned long) -EINVAL; |
728 | 728 | ||
729 | if (subdev->get_unmapped_area) | 729 | return mtd_get_unmapped_area(subdev, len, offset, flags); |
730 | return mtd_get_unmapped_area(subdev, len, offset, | ||
731 | flags); | ||
732 | |||
733 | break; | ||
734 | } | 730 | } |
735 | 731 | ||
736 | return (unsigned long) -ENOSYS; | 732 | return (unsigned long) -ENOSYS; |