summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/scb2_flash.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-30 17:00:35 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 18:26:22 +0000
commit381345652fca688aeaa967c231e5075cf68d05b6 (patch)
tree5f23ecdd28165d15109c6fd7ad0c4c573f094707 /drivers/mtd/maps/scb2_flash.c
parent327cf2922b4edf0439b219469722d2a502e37349 (diff)
downloadblackbird-obmc-linux-381345652fca688aeaa967c231e5075cf68d05b6.tar.gz
blackbird-obmc-linux-381345652fca688aeaa967c231e5075cf68d05b6.zip
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.c3
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)
return;
/* disable flash writes */
- if (scb2_mtd->lock)
- mtd_lock(scb2_mtd, 0, scb2_mtd->size);
+ mtd_lock(scb2_mtd, 0, scb2_mtd->size);
mtd_device_unregister(scb2_mtd);
map_destroy(scb2_mtd);
OpenPOWER on IntegriCloud