mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
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 <tudor.ambarus@microchip.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20221025090306.297886-1-tudor.ambarus@microchip.com Link: https://lore.kernel.org/r/20221025090306.297886-26-tudor.ambarus@microchip.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
4c15a4c7f6
commit
c23cd8c971
1 changed files with 2 additions and 2 deletions
|
@ -2084,7 +2084,7 @@ static int at_dma_resume_noirq(struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct dev_pm_ops at_dma_dev_pm_ops = {
|
static const struct dev_pm_ops __maybe_unused at_dma_dev_pm_ops = {
|
||||||
.prepare = at_dma_prepare,
|
.prepare = at_dma_prepare,
|
||||||
.suspend_noirq = at_dma_suspend_noirq,
|
.suspend_noirq = at_dma_suspend_noirq,
|
||||||
.resume_noirq = at_dma_resume_noirq,
|
.resume_noirq = at_dma_resume_noirq,
|
||||||
|
@ -2096,7 +2096,7 @@ static struct platform_driver at_dma_driver = {
|
||||||
.id_table = atdma_devtypes,
|
.id_table = atdma_devtypes,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "at_hdmac",
|
.name = "at_hdmac",
|
||||||
.pm = &at_dma_dev_pm_ops,
|
.pm = pm_ptr(&at_dma_dev_pm_ops),
|
||||||
.of_match_table = of_match_ptr(atmel_dma_dt_ids),
|
.of_match_table = of_match_ptr(atmel_dma_dt_ids),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue