diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-28 20:35:07 +0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 22:26:08 +0400 |
commit | fc002e3c320602d0e206f607aca0460540d7637a (patch) | |
tree | 59a0a24c3f842da192febfcc5de263a339f1dcc5 /drivers/mtd/sm_ftl.c | |
parent | 33c87b4a2c820316314542ce3f60b8a8c6a96928 (diff) | |
download | linux-fc002e3c320602d0e206f607aca0460540d7637a.tar.xz |
mtd: introduce mtd_has_oob helper
We are working in the direction of making sure that MTD clients to not
use 'mtd->func' pointers directly. In some places we want to know if
OOB operations are supported by an MTD device. Introduce 'mtd_has_oob()'
helper for these purposes.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/sm_ftl.c')
-rw-r--r-- | drivers/mtd/sm_ftl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c index 4ec2af7fb845..072ed5970e2f 100644 --- a/drivers/mtd/sm_ftl.c +++ b/drivers/mtd/sm_ftl.c @@ -645,8 +645,8 @@ int sm_get_media_info(struct sm_ftl *ftl, struct mtd_info *mtd) if (!ftl->smallpagenand && mtd->oobsize < SM_OOB_SIZE) return -ENODEV; - /* We use these functions for IO */ - if (!mtd->read_oob || !mtd->write_oob) + /* We use OOB */ + if (!mtd_has_oob(mtd)) return -ENODEV; /* Find geometry information */ |