diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-30 16:15:59 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 19:26:23 +0100 |
commit | 079c985e7a6f4ce60f931cebfdd5ee3c38347e31 (patch) | |
tree | b4db3f6e38409eeaa8daff4c17b8f642d0939177 /drivers/mtd/mtdcore.c | |
parent | mtd: do not use mtd->lock, unlock and is_locked directly (diff) | |
download | linux-079c985e7a6f4ce60f931cebfdd5ee3c38347e31.tar.xz linux-079c985e7a6f4ce60f931cebfdd5ee3c38347e31.zip |
mtd: do not use mtd->suspend and mtd->resume directly
Just call the 'mtd_suspend()' and 'mtd_resume()' - they will do nothing
if the operation is not defined.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdcore.c')
-rw-r--r-- | drivers/mtd/mtdcore.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 66494ee5355a..6ae9ca01388b 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -119,10 +119,7 @@ static int mtd_cls_suspend(struct device *dev, pm_message_t state) { struct mtd_info *mtd = dev_get_drvdata(dev); - if (mtd && mtd->suspend) - return mtd_suspend(mtd); - else - return 0; + return mtd_suspend(mtd); } static int mtd_cls_resume(struct device *dev) |