Skip to contentSkip to conversation

nvme-pci: use pm_sleep_ptr macro to declare nvme_dev_pm_ops

PATCH Applied Guixin Liu 2 participants 2 messages Jul 20, 2022 – Jul 21, 2022 NVMe

lore
Share & tools
lore

Guixin Liu

author
#0 lore raw

PATCH 1/1 nvme-pci: use pm_sleep_ptr macro to declare nvme_dev_pm_ops

Use the proper macro instead of the brace of "#ifdef CONFIG_PM_SLEEP"

and "#endif".

---
 drivers/nvme/host/pci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/nvme/host/pci.c +1 -3
index 1eb1899..85afe06 100644
@@ -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,
 };
Signature · 1 line
1.8.3.1