drm/exynos: fimc: Clock control is unused if !PM
Protect the fimc_clk_ctrl() function with an #ifdef CONFIG_PM guard to avoid "defined but not used" warnings. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
Родитель
7082947eff
Коммит
641a2fef39
|
@ -1206,23 +1206,6 @@ static struct exynos_drm_ipp_ops fimc_dst_ops = {
|
||||||
.set_addr = fimc_dst_set_addr,
|
.set_addr = fimc_dst_set_addr,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable)
|
|
||||||
{
|
|
||||||
DRM_DEBUG_KMS("enable[%d]\n", enable);
|
|
||||||
|
|
||||||
if (enable) {
|
|
||||||
clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]);
|
|
||||||
clk_prepare_enable(ctx->clocks[FIMC_CLK_WB_A]);
|
|
||||||
ctx->suspended = false;
|
|
||||||
} else {
|
|
||||||
clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]);
|
|
||||||
clk_disable_unprepare(ctx->clocks[FIMC_CLK_WB_A]);
|
|
||||||
ctx->suspended = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
|
static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct fimc_context *ctx = dev_id;
|
struct fimc_context *ctx = dev_id;
|
||||||
|
@ -1780,6 +1763,24 @@ static int fimc_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM
|
||||||
|
static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable)
|
||||||
|
{
|
||||||
|
DRM_DEBUG_KMS("enable[%d]\n", enable);
|
||||||
|
|
||||||
|
if (enable) {
|
||||||
|
clk_prepare_enable(ctx->clocks[FIMC_CLK_GATE]);
|
||||||
|
clk_prepare_enable(ctx->clocks[FIMC_CLK_WB_A]);
|
||||||
|
ctx->suspended = false;
|
||||||
|
} else {
|
||||||
|
clk_disable_unprepare(ctx->clocks[FIMC_CLK_GATE]);
|
||||||
|
clk_disable_unprepare(ctx->clocks[FIMC_CLK_WB_A]);
|
||||||
|
ctx->suspended = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
static int fimc_suspend(struct device *dev)
|
static int fimc_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
|
@ -1806,7 +1807,6 @@ static int fimc_resume(struct device *dev)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
static int fimc_runtime_suspend(struct device *dev)
|
static int fimc_runtime_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct fimc_context *ctx = get_fimc_context(dev);
|
struct fimc_context *ctx = get_fimc_context(dev);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче