mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-08 23:26:28 -04:00
drm/bridge: imx8mp-hdmi-tx: Switch to SYSTEM_SLEEP_PM_OPS()
Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS() alternative. The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code. This allows removing the __maybe_unused notation from the runtime suspend/resume() functions. Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20240626230704.708234-1-festevam@gmail.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240626230704.708234-1-festevam@gmail.com
This commit is contained in:
committed by
Neil Armstrong
parent
0d317e820d
commit
0177033706
@@ -111,12 +111,12 @@ static void imx8mp_dw_hdmi_remove(struct platform_device *pdev)
|
||||
dw_hdmi_remove(hdmi->dw_hdmi);
|
||||
}
|
||||
|
||||
static int __maybe_unused imx8mp_dw_hdmi_pm_suspend(struct device *dev)
|
||||
static int imx8mp_dw_hdmi_pm_suspend(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused imx8mp_dw_hdmi_pm_resume(struct device *dev)
|
||||
static int imx8mp_dw_hdmi_pm_resume(struct device *dev)
|
||||
{
|
||||
struct imx8mp_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
@@ -126,8 +126,7 @@ static int __maybe_unused imx8mp_dw_hdmi_pm_resume(struct device *dev)
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops imx8mp_dw_hdmi_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(imx8mp_dw_hdmi_pm_suspend,
|
||||
imx8mp_dw_hdmi_pm_resume)
|
||||
SYSTEM_SLEEP_PM_OPS(imx8mp_dw_hdmi_pm_suspend, imx8mp_dw_hdmi_pm_resume)
|
||||
};
|
||||
|
||||
static const struct of_device_id imx8mp_dw_hdmi_of_table[] = {
|
||||
@@ -142,7 +141,7 @@ static struct platform_driver imx8mp_dw_hdmi_platform_driver = {
|
||||
.driver = {
|
||||
.name = "imx8mp-dw-hdmi-tx",
|
||||
.of_match_table = imx8mp_dw_hdmi_of_table,
|
||||
.pm = &imx8mp_dw_hdmi_pm_ops,
|
||||
.pm = pm_ptr(&imx8mp_dw_hdmi_pm_ops),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user