From 8375e58c3ac96a43603530a6f02fc81a455982e7 Mon Sep 17 00:00:00 2001 From: Francois Dugast Date: Mon, 23 Jan 2023 18:17:56 +0100 Subject: [PATCH] drm/xe: Use global macros to set PM functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This aligns with other drivers and fixes build failure when CONFIG_PM_SLEEP is not set, such as on RISC-V. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_pci.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index b61bde17f123d..67fd9c3818f90 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -584,15 +584,8 @@ static int xe_pci_runtime_idle(struct device *dev) } static const struct dev_pm_ops xe_pm_ops = { - .suspend = xe_pci_suspend, - .resume = xe_pci_resume, - .freeze = xe_pci_suspend, - .thaw = xe_pci_resume, - .poweroff = xe_pci_suspend, - .restore = xe_pci_resume, - .runtime_suspend = xe_pci_runtime_suspend, - .runtime_resume = xe_pci_runtime_resume, - .runtime_idle = xe_pci_runtime_idle, + SET_SYSTEM_SLEEP_PM_OPS(xe_pci_suspend, xe_pci_resume) + SET_RUNTIME_PM_OPS(xe_pci_runtime_suspend, xe_pci_runtime_resume, xe_pci_runtime_idle) }; static struct pci_driver xe_pci_driver = { -- 2.30.2