]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dmaengine: nbpfaxi: Convert to RUNTIME_PM_OPS()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 4 Sep 2025 15:28:37 +0000 (17:28 +0200)
committerVinod Koul <vkoul@kernel.org>
Thu, 16 Oct 2025 12:11:52 +0000 (17:41 +0530)
Convert the Renesas Type-AXI NBPF DMA driver from SET_RUNTIME_PM_OPS()
to RUNTIME_PM_OPS(), and pm_ptr().  This lets us drop the check for
CONFIG_PM, and reduces kernel size in case CONFIG_PM is disabled, while
increasing build coverage.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/nbpfaxi.c

index 765462303de098c01ee38540ae7e1cf70570e92e..334425faac00bf8ab26a415fd597eaf379c83c21 100644 (file)
@@ -1500,7 +1500,6 @@ static const struct platform_device_id nbpf_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, nbpf_ids);
 
-#ifdef CONFIG_PM
 static int nbpf_runtime_suspend(struct device *dev)
 {
        struct nbpf_device *nbpf = dev_get_drvdata(dev);
@@ -1513,17 +1512,16 @@ static int nbpf_runtime_resume(struct device *dev)
        struct nbpf_device *nbpf = dev_get_drvdata(dev);
        return clk_prepare_enable(nbpf->clk);
 }
-#endif
 
 static const struct dev_pm_ops nbpf_pm_ops = {
-       SET_RUNTIME_PM_OPS(nbpf_runtime_suspend, nbpf_runtime_resume, NULL)
+       RUNTIME_PM_OPS(nbpf_runtime_suspend, nbpf_runtime_resume, NULL)
 };
 
 static struct platform_driver nbpf_driver = {
        .driver = {
                .name = "dma-nbpf",
                .of_match_table = nbpf_match,
-               .pm = &nbpf_pm_ops,
+               .pm = pm_ptr(&nbpf_pm_ops),
        },
        .id_table = nbpf_ids,
        .probe = nbpf_probe,