Skip to content

Commit c23cd8c

Browse files
ambarusvinodkoul
authored andcommitted
dmaengine: at_hdmac: Use pm_ptr()
Use pm_ptr() macro to fill at_dma_driver.driver.pm. In case CONFIG_PM is not enabled, the macro will return NULL. When NULL, at_dma_dev_pm_ops will end up being unused, so prepend it with the __maybe_unused attribute. Signed-off-by: Tudor Ambarus <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 4c15a4c commit c23cd8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/at_hdmac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,7 +2084,7 @@ static int at_dma_resume_noirq(struct device *dev)
20842084
return 0;
20852085
}
20862086

2087-
static const struct dev_pm_ops at_dma_dev_pm_ops = {
2087+
static const struct dev_pm_ops __maybe_unused at_dma_dev_pm_ops = {
20882088
.prepare = at_dma_prepare,
20892089
.suspend_noirq = at_dma_suspend_noirq,
20902090
.resume_noirq = at_dma_resume_noirq,
@@ -2096,7 +2096,7 @@ static struct platform_driver at_dma_driver = {
20962096
.id_table = atdma_devtypes,
20972097
.driver = {
20982098
.name = "at_hdmac",
2099-
.pm = &at_dma_dev_pm_ops,
2099+
.pm = pm_ptr(&at_dma_dev_pm_ops),
21002100
.of_match_table = of_match_ptr(atmel_dma_dt_ids),
21012101
},
21022102
};

0 commit comments

Comments
 (0)