OSDN Git Service

dmaengine: at_hdmac: Use pm_ptr()
authorTudor Ambarus <tudor.ambarus@microchip.com>
Tue, 25 Oct 2022 09:02:59 +0000 (12:02 +0300)
committerVinod Koul <vkoul@kernel.org>
Fri, 11 Nov 2022 06:45:08 +0000 (12:15 +0530)
commitc23cd8c971f0b4697f344d981f13aae4123f866d
tree8b45afadda35229c007e827bb833ce124c44d7dd
parent4c15a4c7f693f1f45ef534ddc428f2a9aa67bd13
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>
drivers/dma/at_hdmac.c