This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: imx-mipi-csis: Switch to RUNTIME_PM_OPS()
Author:  Fabio Estevam <feste...@denx.de>
Date:    Wed Aug 7 15:26:09 2024 -0300

Replace SET_RUNTIME_PM_OPS() with its modern RUNTIME_PM_OPS()
alternative.

The combined usage of pm_ptr() and RUNTIME_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 <feste...@denx.de>
Reviewed-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com>
Link: https://lore.kernel.org/r/20240807182610.81244-1-feste...@gmail.com
Signed-off-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com>

 drivers/media/platform/nxp/imx-mipi-csis.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

---

diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c 
b/drivers/media/platform/nxp/imx-mipi-csis.c
index e0b1d3adda10..44e1402e8be1 100644
--- a/drivers/media/platform/nxp/imx-mipi-csis.c
+++ b/drivers/media/platform/nxp/imx-mipi-csis.c
@@ -1347,7 +1347,7 @@ err_parse:
  * Suspend/resume
  */
 
-static int __maybe_unused mipi_csis_runtime_suspend(struct device *dev)
+static int mipi_csis_runtime_suspend(struct device *dev)
 {
        struct v4l2_subdev *sd = dev_get_drvdata(dev);
        struct mipi_csis_device *csis = sd_to_mipi_csis_device(sd);
@@ -1362,7 +1362,7 @@ static int __maybe_unused 
mipi_csis_runtime_suspend(struct device *dev)
        return 0;
 }
 
-static int __maybe_unused mipi_csis_runtime_resume(struct device *dev)
+static int mipi_csis_runtime_resume(struct device *dev)
 {
        struct v4l2_subdev *sd = dev_get_drvdata(dev);
        struct mipi_csis_device *csis = sd_to_mipi_csis_device(sd);
@@ -1382,8 +1382,8 @@ static int __maybe_unused mipi_csis_runtime_resume(struct 
device *dev)
 }
 
 static const struct dev_pm_ops mipi_csis_pm_ops = {
-       SET_RUNTIME_PM_OPS(mipi_csis_runtime_suspend, mipi_csis_runtime_resume,
-                          NULL)
+       RUNTIME_PM_OPS(mipi_csis_runtime_suspend, mipi_csis_runtime_resume,
+                      NULL)
 };
 
 /* 
-----------------------------------------------------------------------------
@@ -1574,7 +1574,7 @@ static struct platform_driver mipi_csis_driver = {
        .driver         = {
                .of_match_table = mipi_csis_of_match,
                .name           = CSIS_DRIVER_NAME,
-               .pm             = &mipi_csis_pm_ops,
+               .pm             = pm_ptr(&mipi_csis_pm_ops),
        },
 };
 

Reply via email to