aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-23 08:25:39 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:25:11 -0500
commit7e1f0dc0551b99acb5e8fa161a7ac401994d57d8 (patch)
tree19108039bb082d42fbda40d4bd3ddb11a1185cd1 /drivers/staging
parent969e57adc2589a0a0ae5edbbe7b92062565ce70b (diff)
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/spectra/lld_mtd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/spectra/lld_mtd.c b/drivers/staging/spectra/lld_mtd.c
index a9c309a167c2..d638fafab649 100644
--- a/drivers/staging/spectra/lld_mtd.c
+++ b/drivers/staging/spectra/lld_mtd.c
@@ -188,7 +188,7 @@ u16 mtd_Erase_Block(u32 block_add)
188 erase.len = spectra_mtd->erasesize; 188 erase.len = spectra_mtd->erasesize;
189 erase.priv = (unsigned long)&comp; 189 erase.priv = (unsigned long)&comp;
190 190
191 ret = spectra_mtd->erase(spectra_mtd, &erase); 191 ret = mtd_erase(spectra_mtd, &erase);
192 if (!ret) { 192 if (!ret) {
193 wait_for_completion(&comp); 193 wait_for_completion(&comp);
194 if (erase.state != MTD_ERASE_DONE) 194 if (erase.state != MTD_ERASE_DONE)