Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: nbpfaxi: Convert to RUNTIME_PM_OPS()

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>

authored by

Geert Uytterhoeven and committed by
Vinod Koul
75396f5b b46d155e

+2 -4
+2 -4
drivers/dma/nbpfaxi.c
··· 1500 1500 }; 1501 1501 MODULE_DEVICE_TABLE(platform, nbpf_ids); 1502 1502 1503 - #ifdef CONFIG_PM 1504 1503 static int nbpf_runtime_suspend(struct device *dev) 1505 1504 { 1506 1505 struct nbpf_device *nbpf = dev_get_drvdata(dev); ··· 1512 1513 struct nbpf_device *nbpf = dev_get_drvdata(dev); 1513 1514 return clk_prepare_enable(nbpf->clk); 1514 1515 } 1515 - #endif 1516 1516 1517 1517 static const struct dev_pm_ops nbpf_pm_ops = { 1518 - SET_RUNTIME_PM_OPS(nbpf_runtime_suspend, nbpf_runtime_resume, NULL) 1518 + RUNTIME_PM_OPS(nbpf_runtime_suspend, nbpf_runtime_resume, NULL) 1519 1519 }; 1520 1520 1521 1521 static struct platform_driver nbpf_driver = { 1522 1522 .driver = { 1523 1523 .name = "dma-nbpf", 1524 1524 .of_match_table = nbpf_match, 1525 - .pm = &nbpf_pm_ops, 1525 + .pm = pm_ptr(&nbpf_pm_ops), 1526 1526 }, 1527 1527 .id_table = nbpf_ids, 1528 1528 .probe = nbpf_probe,