diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-30 17:00:35 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 18:26:22 +0000 |
commit | 381345652fca688aeaa967c231e5075cf68d05b6 (patch) | |
tree | 5f23ecdd28165d15109c6fd7ad0c4c573f094707 /drivers/mtd/maps/scb2_flash.c | |
parent | 327cf2922b4edf0439b219469722d2a502e37349 (diff) | |
download | op-kernel-dev-381345652fca688aeaa967c231e5075cf68d05b6.zip op-kernel-dev-381345652fca688aeaa967c231e5075cf68d05b6.tar.gz |
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 01af347..934a72c 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); |