Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287203
b: refs/heads/master
c: 1a30871
h: refs/heads/master
i:
  287201: dfa51c8
  287199: f4a6509
v: v3
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Jan 30, 2012
1 parent b451c9a commit e185557
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bce41d601e58af12cee1398fe836e6b9a8fb5396
refs/heads/master: 1a30871fe635d3e92972e6b93e39ff65bb57e52d
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/mtdcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static int mtd_cls_suspend(struct device *dev, pm_message_t state)
{
struct mtd_info *mtd = dev_get_drvdata(dev);

return mtd_suspend(mtd);
return mtd ? mtd_suspend(mtd) : 0;
}

static int mtd_cls_resume(struct device *dev)
Expand Down
4 changes: 1 addition & 3 deletions trunk/include/linux/mtd/mtd.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,7 @@ static inline int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len)

static inline int mtd_suspend(struct mtd_info *mtd)
{
if (!mtd->suspend)
return -EOPNOTSUPP;
return mtd->suspend(mtd);
return mtd->suspend ? mtd->suspend(mtd) : 0;
}

static inline void mtd_resume(struct mtd_info *mtd)
Expand Down

0 comments on commit e185557

Please sign in to comment.