Skip to content

Commit 75396f5

Browse files
geertuvinodkoul
authored andcommitted
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>
1 parent b46d155 commit 75396f5

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/dma/nbpfaxi.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,6 @@ static const struct platform_device_id nbpf_ids[] = {
15001500
};
15011501
MODULE_DEVICE_TABLE(platform, nbpf_ids);
15021502

1503-
#ifdef CONFIG_PM
15041503
static int nbpf_runtime_suspend(struct device *dev)
15051504
{
15061505
struct nbpf_device *nbpf = dev_get_drvdata(dev);
@@ -1513,17 +1512,16 @@ static int nbpf_runtime_resume(struct device *dev)
15131512
struct nbpf_device *nbpf = dev_get_drvdata(dev);
15141513
return clk_prepare_enable(nbpf->clk);
15151514
}
1516-
#endif
15171515

15181516
static const struct dev_pm_ops nbpf_pm_ops = {
1519-
SET_RUNTIME_PM_OPS(nbpf_runtime_suspend, nbpf_runtime_resume, NULL)
1517+
RUNTIME_PM_OPS(nbpf_runtime_suspend, nbpf_runtime_resume, NULL)
15201518
};
15211519

15221520
static struct platform_driver nbpf_driver = {
15231521
.driver = {
15241522
.name = "dma-nbpf",
15251523
.of_match_table = nbpf_match,
1526-
.pm = &nbpf_pm_ops,
1524+
.pm = pm_ptr(&nbpf_pm_ops),
15271525
},
15281526
.id_table = nbpf_ids,
15291527
.probe = nbpf_probe,

0 commit comments

Comments
 (0)