diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-30 10:00:35 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:26:22 -0500 |
commit | 381345652fca688aeaa967c231e5075cf68d05b6 (patch) | |
tree | 5f23ecdd28165d15109c6fd7ad0c4c573f094707 /drivers/mtd/maps/scb2_flash.c | |
parent | 327cf2922b4edf0439b219469722d2a502e37349 (diff) |
mtd: do not use mtd->lock, unlock and is_locked directly
Instead, call the corresponding MTD API function which will return
'-EOPNOTSUPP' if the operation is not supported.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps/scb2_flash.c')
-rw-r--r-- | drivers/mtd/maps/scb2_flash.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c index 01af34778de3..934a72c80078 100644 --- a/drivers/mtd/maps/scb2_flash.c +++ b/drivers/mtd/maps/scb2_flash.c | |||
@@ -204,8 +204,7 @@ scb2_flash_remove(struct pci_dev *dev) | |||
204 | return; | 204 | return; |
205 | 205 | ||
206 | /* disable flash writes */ | 206 | /* disable flash writes */ |
207 | if (scb2_mtd->lock) | 207 | mtd_lock(scb2_mtd, 0, scb2_mtd->size); |
208 | mtd_lock(scb2_mtd, 0, scb2_mtd->size); | ||
209 | 208 | ||
210 | mtd_device_unregister(scb2_mtd); | 209 | mtd_device_unregister(scb2_mtd); |
211 | map_destroy(scb2_mtd); | 210 | map_destroy(scb2_mtd); |