[PATCH] nvme-pci: use pm_sleep_ptr macro to declare nvme_dev_pm_ops
Guixin Liu
kanie at linux.alibaba.com
Wed Jul 20 04:33:02 PDT 2022
Use the proper macro instead of the brace of "#ifdef CONFIG_PM_SLEEP"
and "#endif".
Signed-off-by: Guixin Liu <kanie at linux.alibaba.com>
---
drivers/nvme/host/pci.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 1eb1899..85afe06 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3544,11 +3544,9 @@ static void nvme_error_resume(struct pci_dev *pdev)
.probe = nvme_probe,
.remove = nvme_remove,
.shutdown = nvme_shutdown,
-#ifdef CONFIG_PM_SLEEP
.driver = {
- .pm = &nvme_dev_pm_ops,
+ .pm = pm_sleep_ptr(&nvme_dev_pm_ops),
},
-#endif
.sriov_configure = pci_sriov_configure_simple,
.err_handler = &nvme_err_handler,
};
--
1.8.3.1
More information about the Linux-nvme
mailing list