]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm: renesas: rz-du: mipi_dsi: Convert to RUNTIME_PM_OPS()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 9 Jul 2025 18:43:25 +0000 (20:43 +0200)
committerBiju Das <biju.das.jz@bp.renesas.com>
Thu, 14 Aug 2025 05:57:34 +0000 (06:57 +0100)
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 <geert+renesas@glider.be>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/cdfc1b8ec9e62553654639b9e9026bfed8dd07d1.1752086582.git.geert+renesas@glider.be
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c

index f87337c3cbb54559e9e8d416cbe801647f4a7688..3b52dfc0ea1e04e6ec6ffe2591b50aab13a8ccd2 100644 (file)
@@ -913,7 +913,7 @@ static const struct mipi_dsi_host_ops rzg2l_mipi_dsi_host_ops = {
  * Power Management
  */
 
-static int __maybe_unused rzg2l_mipi_pm_runtime_suspend(struct device *dev)
+static int rzg2l_mipi_pm_runtime_suspend(struct device *dev)
 {
        struct rzg2l_mipi_dsi *dsi = dev_get_drvdata(dev);
 
@@ -923,7 +923,7 @@ static int __maybe_unused rzg2l_mipi_pm_runtime_suspend(struct device *dev)
        return 0;
 }
 
-static int __maybe_unused rzg2l_mipi_pm_runtime_resume(struct device *dev)
+static int rzg2l_mipi_pm_runtime_resume(struct device *dev)
 {
        struct rzg2l_mipi_dsi *dsi = dev_get_drvdata(dev);
        int ret;
@@ -940,7 +940,7 @@ static int __maybe_unused rzg2l_mipi_pm_runtime_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops rzg2l_mipi_pm_ops = {
-       SET_RUNTIME_PM_OPS(rzg2l_mipi_pm_runtime_suspend, rzg2l_mipi_pm_runtime_resume, NULL)
+       RUNTIME_PM_OPS(rzg2l_mipi_pm_runtime_suspend, rzg2l_mipi_pm_runtime_resume, NULL)
 };
 
 /* -----------------------------------------------------------------------------
@@ -1072,7 +1072,7 @@ static struct platform_driver rzg2l_mipi_dsi_platform_driver = {
        .remove = rzg2l_mipi_dsi_remove,
        .driver = {
                .name = "rzg2l-mipi-dsi",
-               .pm = &rzg2l_mipi_pm_ops,
+               .pm = pm_ptr(&rzg2l_mipi_pm_ops),
                .of_match_table = rzg2l_mipi_dsi_of_table,
        },
 };