mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-12 01:20:14 +00:00
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>
This commit is contained in:
parent
b46d155e0d
commit
75396f5b95
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user