Skip to content

Commit 0070851

Browse files
geertubijudas
authored andcommitted
drm: renesas: rz-du: mipi_dsi: Convert to RUNTIME_PM_OPS()
Convert the Renesas RZ/G2L MIPI DSI Encoder driver from SET_RUNTIME_PM_OPS() to RUNTIME_PM_OPS() and pm_ptr(). This lets us drop the __maybe_unused annotations from its runtime suspend and resume callbacks, and reduces kernel size in case CONFIG_PM is disabled. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Biju Das <[email protected]> Signed-off-by: Biju Das <[email protected]> Link: https://lore.kernel.org/r/cdfc1b8ec9e62553654639b9e9026bfed8dd07d1.1752086582.git.geert+renesas@glider.be
1 parent ed07a76 commit 0070851

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ static const struct mipi_dsi_host_ops rzg2l_mipi_dsi_host_ops = {
913913
* Power Management
914914
*/
915915

916-
static int __maybe_unused rzg2l_mipi_pm_runtime_suspend(struct device *dev)
916+
static int rzg2l_mipi_pm_runtime_suspend(struct device *dev)
917917
{
918918
struct rzg2l_mipi_dsi *dsi = dev_get_drvdata(dev);
919919

@@ -923,7 +923,7 @@ static int __maybe_unused rzg2l_mipi_pm_runtime_suspend(struct device *dev)
923923
return 0;
924924
}
925925

926-
static int __maybe_unused rzg2l_mipi_pm_runtime_resume(struct device *dev)
926+
static int rzg2l_mipi_pm_runtime_resume(struct device *dev)
927927
{
928928
struct rzg2l_mipi_dsi *dsi = dev_get_drvdata(dev);
929929
int ret;
@@ -940,7 +940,7 @@ static int __maybe_unused rzg2l_mipi_pm_runtime_resume(struct device *dev)
940940
}
941941

942942
static const struct dev_pm_ops rzg2l_mipi_pm_ops = {
943-
SET_RUNTIME_PM_OPS(rzg2l_mipi_pm_runtime_suspend, rzg2l_mipi_pm_runtime_resume, NULL)
943+
RUNTIME_PM_OPS(rzg2l_mipi_pm_runtime_suspend, rzg2l_mipi_pm_runtime_resume, NULL)
944944
};
945945

946946
/* -----------------------------------------------------------------------------
@@ -1072,7 +1072,7 @@ static struct platform_driver rzg2l_mipi_dsi_platform_driver = {
10721072
.remove = rzg2l_mipi_dsi_remove,
10731073
.driver = {
10741074
.name = "rzg2l-mipi-dsi",
1075-
.pm = &rzg2l_mipi_pm_ops,
1075+
.pm = pm_ptr(&rzg2l_mipi_pm_ops),
10761076
.of_match_table = rzg2l_mipi_dsi_of_table,
10771077
},
10781078
};

0 commit comments

Comments
 (0)