summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/apple.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-11-08 13:20:12 +0300
committerChristoph Hellwig <hch@lst.de>2022-12-06 16:36:54 +0300
commit285b6e9b571714270fa503d0e32f244d15b9f85f (patch)
tree3ed84add4be44902683405ac38b2b9800966e02d /drivers/nvme/host/apple.c
parente6d275de2e4aaebdc97aa022c031a0dcc475efa4 (diff)
downloadlinux-285b6e9b571714270fa503d0e32f244d15b9f85f.tar.xz
nvme: merge nvme_shutdown_ctrl into nvme_disable_ctrl
Many of the callers decide which one to use based on a bool argument and there is at least some code to be shared, so merge these two. Also move a comment specific to a single callsite to that callsite. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Hector Martin <marcan@marcan.st>
Diffstat (limited to 'drivers/nvme/host/apple.c')
-rw-r--r--drivers/nvme/host/apple.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index 56d9e9be945b..e36aeb50b4ed 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -829,10 +829,7 @@ static void apple_nvme_disable(struct apple_nvme *anv, bool shutdown)
apple_nvme_remove_cq(anv);
}
- if (shutdown)
- nvme_shutdown_ctrl(&anv->ctrl);
- else
- nvme_disable_ctrl(&anv->ctrl);
+ nvme_disable_ctrl(&anv->ctrl, shutdown);
}
WRITE_ONCE(anv->ioq.enabled, false);