diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-28 18:35:07 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 18:26:08 +0000 |
commit | fc002e3c320602d0e206f607aca0460540d7637a (patch) | |
tree | 59a0a24c3f842da192febfcc5de263a339f1dcc5 /drivers/mtd/mtdchar.c | |
parent | 33c87b4a2c820316314542ce3f60b8a8c6a96928 (diff) | |
download | op-kernel-dev-fc002e3c320602d0e206f607aca0460540d7637a.zip op-kernel-dev-fc002e3c320602d0e206f607aca0460540d7637a.tar.gz |
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/mtdchar.c')
-rw-r--r-- | drivers/mtd/mtdchar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 83b0c82..c501eec 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -1004,7 +1004,7 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg) break; case MTD_FILE_MODE_RAW: - if (!mtd->read_oob || !mtd->write_oob) + if (!mtd_has_oob(mtd)) return -EOPNOTSUPP; mfi->mode = arg; |