mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
PM / devfreq: rockchip_dmc: Don't do suspend and resume when devfreq is null
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Change-Id: I2d1c87024507ae1670f1e5eae8c4c3872e1a3f91
This commit is contained in:
@@ -3362,10 +3362,12 @@ static __maybe_unused int rockchip_dmcfreq_suspend(struct device *dev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = devfreq_suspend_device(dmcfreq->info.devfreq);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to suspend the devfreq devices\n");
|
||||
return ret;
|
||||
if (dmcfreq->info.devfreq) {
|
||||
ret = devfreq_suspend_device(dmcfreq->info.devfreq);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to suspend the devfreq devices\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/* set voltage to sleep_volt if need */
|
||||
@@ -3425,11 +3427,14 @@ static __maybe_unused int rockchip_dmcfreq_resume(struct device *dev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = devfreq_resume_device(dmcfreq->info.devfreq);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to resume the devfreq devices\n");
|
||||
return ret;
|
||||
if (dmcfreq->info.devfreq) {
|
||||
ret = devfreq_resume_device(dmcfreq->info.devfreq);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to resume the devfreq devices\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user