Skip to content

Commit 900f5b3

Browse files
AngeloGioacchino Del RegnoChun-Kuang Hu
authored andcommitted
drm/mediatek: mtk_hdmi: Remove ifdef for CONFIG_PM_SLEEP
Since the SIMPLE_DEV_PM_OPS macro and the pm pointer are anyway defined when CONFIG_PM_SLEEP is not set, remove the ifdef for it and indicate that the mtk_hdmi_{remove,suspend} functions may be unused (as they are, in case PM support is not built-in). While at it, to improve readability, also compress the SIMPLE_DEV_PM_OPS declaration as it even fits in less than 80 columns. Reviewed-by: CK Hu <[email protected]> Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent eb8779b commit 900f5b3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/gpu/drm/mediatek/mtk_hdmi.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,8 +1750,7 @@ static void mtk_hdmi_remove(struct platform_device *pdev)
17501750
mtk_hdmi_clk_disable_audio(hdmi);
17511751
}
17521752

1753-
#ifdef CONFIG_PM_SLEEP
1754-
static int mtk_hdmi_suspend(struct device *dev)
1753+
static __maybe_unused int mtk_hdmi_suspend(struct device *dev)
17551754
{
17561755
struct mtk_hdmi *hdmi = dev_get_drvdata(dev);
17571756

@@ -1760,7 +1759,7 @@ static int mtk_hdmi_suspend(struct device *dev)
17601759
return 0;
17611760
}
17621761

1763-
static int mtk_hdmi_resume(struct device *dev)
1762+
static __maybe_unused int mtk_hdmi_resume(struct device *dev)
17641763
{
17651764
struct mtk_hdmi *hdmi = dev_get_drvdata(dev);
17661765
int ret = 0;
@@ -1773,9 +1772,8 @@ static int mtk_hdmi_resume(struct device *dev)
17731772

17741773
return 0;
17751774
}
1776-
#endif
1777-
static SIMPLE_DEV_PM_OPS(mtk_hdmi_pm_ops,
1778-
mtk_hdmi_suspend, mtk_hdmi_resume);
1775+
1776+
static SIMPLE_DEV_PM_OPS(mtk_hdmi_pm_ops, mtk_hdmi_suspend, mtk_hdmi_resume);
17791777

17801778
static const struct mtk_hdmi_conf mtk_hdmi_conf_mt2701 = {
17811779
.tz_disabled = true,

0 commit comments

Comments
 (0)