mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
clk: versaclock5: restore cache_only on regcache_sync() failure in resume
If regcache_sync() fails in vc5_resume(), the function only logs the error, leaving regmap with cache_only disabled even though the register cache has not been synchronized with the hardware. Re-enable cache_only on failure to restore the state established by vc5_suspend(). Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
29e5259e30
commit
7b283b8ce3
|
|
@ -1240,8 +1240,10 @@ static int vc5_resume(struct device *dev)
|
|||
|
||||
regcache_cache_only(vc5->regmap, false);
|
||||
ret = regcache_sync(vc5->regmap);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
regcache_cache_only(vc5->regmap, true);
|
||||
dev_err(dev, "Failed to restore register map: %d\n", ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user