linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] PCI/portdrv: Remove the .remove() method in pcie_portdriver
@ 2020-09-11 10:09 Huacai Chen
  2020-09-11 10:09 ` [PATCH 2/2] PCI/portdrv: Don't disable pci device during shutdown Huacai Chen
  2020-09-13  5:01 ` [PATCH 1/2] PCI/portdrv: Remove the .remove() method in pcie_portdriver Lukas Wunner
  0 siblings, 2 replies; 9+ messages in thread
From: Huacai Chen @ 2020-09-11 10:09 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Alex Deucher, linux-pci, Huacai Chen, Jiaxun Yang, Huacai Chen

As Bjorn Helgaas said, portdrv can only be built statically (not as a
module), so the .remove() method in pcie_portdriver is useless. So just
remove it.

BTW, rename pcie_portdrv_remove() to pcie_portdrv_shutdown() since it
is only used by the .shutdown() method now.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
 drivers/pci/pcie/portdrv_pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 3a3ce40..4e0af0f 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -134,7 +134,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
 	return 0;
 }
 
-static void pcie_portdrv_remove(struct pci_dev *dev)
+static void pcie_portdrv_shutdown(struct pci_dev *dev)
 {
 	if (pci_bridge_d3_possible(dev)) {
 		pm_runtime_forbid(&dev->dev);
@@ -210,8 +210,7 @@ static struct pci_driver pcie_portdriver = {
 	.id_table	= &port_pci_ids[0],
 
 	.probe		= pcie_portdrv_probe,
-	.remove		= pcie_portdrv_remove,
-	.shutdown	= pcie_portdrv_remove,
+	.shutdown	= pcie_portdrv_shutdown,
 
 	.err_handler	= &pcie_portdrv_err_handler,
 
-- 
2.7.0


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

end of thread, other threads:[~2020-09-15  2:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 10:09 [PATCH 1/2] PCI/portdrv: Remove the .remove() method in pcie_portdriver Huacai Chen
2020-09-11 10:09 ` [PATCH 2/2] PCI/portdrv: Don't disable pci device during shutdown Huacai Chen
2020-09-13 16:04   ` Bjorn Helgaas
2020-09-14 20:43     ` Deucher, Alexander
2020-09-13  5:01 ` [PATCH 1/2] PCI/portdrv: Remove the .remove() method in pcie_portdriver Lukas Wunner
2020-09-13 15:42   ` Bjorn Helgaas
2020-09-14 20:34     ` Deucher, Alexander
2020-09-14 22:03       ` Bjorn Helgaas
2020-09-15  2:50       ` Lukas Wunner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).