mtd: introduce mtd_erase interface
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 23 Dec 2011 13:25:39 +0000 (15:25 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 9 Jan 2012 18:25:11 +0000 (18:25 +0000)
commit7e1f0dc0551b99acb5e8fa161a7ac401994d57d8
tree19108039bb082d42fbda40d4bd3ddb11a1185cd1
parent969e57adc2589a0a0ae5edbbe7b92062565ce70b
mtd: introduce mtd_erase interface

This patch is part of a patch-set which changes the MTD interface
from 'mtd->func()' form to 'mtd_func()' form. We need this because
we want to add common code to to all drivers in the mtd core level,
which is impossible with the current interface when MTD clients
call driver functions like 'read()' or 'write()' directly.

At this point we just introduce a new inline wrapper function, but
later some of them are expected to gain more code. E.g., the input
parameters check should be moved to the wrappers rather than be
duplicated at many drivers.

This particular patch introduced the 'mtd_erase()' interface. The
following patches add all the other interfaces one by one.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
22 files changed:
drivers/mtd/ftl.c
drivers/mtd/inftlmount.c
drivers/mtd/mtdblock.c
drivers/mtd/mtdchar.c
drivers/mtd/mtdconcat.c
drivers/mtd/mtdoops.c
drivers/mtd/mtdpart.c
drivers/mtd/mtdswap.c
drivers/mtd/nftlmount.c
drivers/mtd/rfd_ftl.c
drivers/mtd/sm_ftl.c
drivers/mtd/tests/mtd_oobtest.c
drivers/mtd/tests/mtd_pagetest.c
drivers/mtd/tests/mtd_speedtest.c
drivers/mtd/tests/mtd_stresstest.c
drivers/mtd/tests/mtd_subpagetest.c
drivers/mtd/tests/mtd_torturetest.c
drivers/mtd/ubi/io.c
drivers/staging/spectra/lld_mtd.c
fs/jffs2/erase.c
fs/logfs/dev_mtd.c
include/linux/mtd/mtd.h