On Wed Jul 9 21:16:07 2025 +0200, Geert Uytterhoeven wrote:
> Convert the Renesas Digital Radio Interface driver from
> SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr().
> This lets us drop the __maybe_unused annotations from its suspend and
> resume callbacks, and reduces kernel size in case CONFIG_PM or
> CONFIG_PM_SLEEP is disabled.
> 
> Signed-off-by: Geert Uytterhoeven <[email protected]>
> Reviewed-by: Laurent Pinchart <[email protected]>
> Reviewed-by: Fabrizio Castro <[email protected]>
> Signed-off-by: Laurent Pinchart <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/platform/renesas/rcar_drif.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

---

diff --git a/drivers/media/platform/renesas/rcar_drif.c 
b/drivers/media/platform/renesas/rcar_drif.c
index fc8b6bbef793..11bf47fb8266 100644
--- a/drivers/media/platform/renesas/rcar_drif.c
+++ b/drivers/media/platform/renesas/rcar_drif.c
@@ -1446,18 +1446,18 @@ static void rcar_drif_remove(struct platform_device 
*pdev)
 }
 
 /* FIXME: Implement suspend/resume support */
-static int __maybe_unused rcar_drif_suspend(struct device *dev)
+static int rcar_drif_suspend(struct device *dev)
 {
        return 0;
 }
 
-static int __maybe_unused rcar_drif_resume(struct device *dev)
+static int rcar_drif_resume(struct device *dev)
 {
        return 0;
 }
 
-static SIMPLE_DEV_PM_OPS(rcar_drif_pm_ops, rcar_drif_suspend,
-                        rcar_drif_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(rcar_drif_pm_ops, rcar_drif_suspend,
+                               rcar_drif_resume);
 
 static const struct of_device_id rcar_drif_of_table[] = {
        { .compatible = "renesas,rcar-gen3-drif" },
@@ -1470,8 +1470,8 @@ static struct platform_driver rcar_drif_driver = {
        .driver = {
                .name = RCAR_DRIF_DRV_NAME,
                .of_match_table = rcar_drif_of_table,
-               .pm = &rcar_drif_pm_ops,
-               },
+               .pm = pm_sleep_ptr(&rcar_drif_pm_ops),
+       },
        .probe = rcar_drif_probe,
        .remove = rcar_drif_remove,
 };

Reply via email to