public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] nvme-pci: use pm_sleep_ptr macro to declare nvme_dev_pm_ops
@ 2022-07-20 11:33 Guixin Liu
  2022-07-21  5:41 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Guixin Liu @ 2022-07-20 11:33 UTC (permalink / raw)
  To: kbusch, axboe, hch, sagi; +Cc: linux-nvme

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

and "#endif".

Signed-off-by: Guixin Liu <kanie@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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nvme-pci: use pm_sleep_ptr macro to declare nvme_dev_pm_ops
  2022-07-20 11:33 [PATCH] nvme-pci: use pm_sleep_ptr macro to declare nvme_dev_pm_ops Guixin Liu
@ 2022-07-21  5:41 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2022-07-21  5:41 UTC (permalink / raw)
  To: Guixin Liu; +Cc: kbusch, axboe, hch, sagi, linux-nvme

Thanks,

applied to nvme-5.20.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-21  5:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-20 11:33 [PATCH] nvme-pci: use pm_sleep_ptr macro to declare nvme_dev_pm_ops Guixin Liu
2022-07-21  5:41 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox