diff options
author | Stefan Agner <stefan@agner.ch> | 2016-02-11 16:56:30 -0800 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2016-06-18 18:34:24 -0700 |
commit | ff09b41f0398d67db9614c29f1b67ae82a19d68d (patch) | |
tree | 20e97540b04e8ebdfa1f68c98fe5e4a159afab12 /drivers/gpu/drm/fsl-dcu | |
parent | 1277f80271a2a4cfabd71f454cba5dafbe820bcb (diff) | |
download | op-kernel-dev-ff09b41f0398d67db9614c29f1b67ae82a19d68d.zip op-kernel-dev-ff09b41f0398d67db9614c29f1b67ae82a19d68d.tar.gz |
drm/fsl-dcu: use clk helpers
Use clk_prepare_enable and clk_disable_unprepare helpers. This also
fixes a sequence issue in the enable path which lead to a warning
on resume.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Diffstat (limited to 'drivers/gpu/drm/fsl-dcu')
-rw-r--r-- | drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c index 9daca1f..06a4d01 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c @@ -232,8 +232,7 @@ static int fsl_dcu_drm_pm_suspend(struct device *dev) drm_kms_helper_poll_disable(fsl_dev->drm); regcache_cache_only(fsl_dev->regmap, true); regcache_mark_dirty(fsl_dev->regmap); - clk_disable(fsl_dev->clk); - clk_unprepare(fsl_dev->clk); + clk_disable_unprepare(fsl_dev->clk); return 0; } @@ -246,15 +245,9 @@ static int fsl_dcu_drm_pm_resume(struct device *dev) if (!fsl_dev) return 0; - ret = clk_enable(fsl_dev->clk); + ret = clk_prepare_enable(fsl_dev->clk); if (ret < 0) { dev_err(dev, "failed to enable dcu clk\n"); - clk_unprepare(fsl_dev->clk); - return ret; - } - ret = clk_prepare(fsl_dev->clk); - if (ret < 0) { - dev_err(dev, "failed to prepare dcu clk\n"); return ret; } |