diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-30 10:15:59 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:26:23 -0500 |
commit | 079c985e7a6f4ce60f931cebfdd5ee3c38347e31 (patch) | |
tree | b4db3f6e38409eeaa8daff4c17b8f642d0939177 /drivers/mtd/mtdcore.c | |
parent | 381345652fca688aeaa967c231e5075cf68d05b6 (diff) |
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 66494ee5355..6ae9ca01388 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) | |||
119 | { | 119 | { |
120 | struct mtd_info *mtd = dev_get_drvdata(dev); | 120 | struct mtd_info *mtd = dev_get_drvdata(dev); |
121 | 121 | ||
122 | if (mtd && mtd->suspend) | 122 | return mtd_suspend(mtd); |
123 | return mtd_suspend(mtd); | ||
124 | else | ||
125 | return 0; | ||
126 | } | 123 | } |
127 | 124 | ||
128 | static int mtd_cls_resume(struct device *dev) | 125 | static int mtd_cls_resume(struct device *dev) |