]> git.baikalelectronics.ru Git - kernel.git/commit
romfs: do not use mtd->get_unmapped_area directly
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 28 Dec 2011 15:08:03 +0000 (17:08 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 9 Jan 2012 18:26:12 +0000 (18:26 +0000)
commit587843fc629f2fc8a9c82da685f04ab116507657
tree77454b88465118f8cf1127049cbf96c47da2c415
parent44f5dbf1b47c1b83cffe79eb13bfd69d5dd5fb72
romfs: 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 then test for this code.

We also translate -EOPNOTSUPP to -ENOSYS because this return code is
probably part of the kernel ABI which we do not want to break.

Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
fs/romfs/mmap-nommu.c