[PATCH RFC 2/2] PCI: Remove MWI and INTX related members from struct pci_devres

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After patch 1 of the series the original value of register PCI_COMMAND
is restored in pcim_release. Therefore the code removed here isn't
needed any longer.

In a follow-up step pcim_set_mwi() could be removed.

Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
---
 drivers/pci/devres.c |  7 -------
 drivers/pci/pci.c    | 11 +----------
 drivers/pci/pci.h    |  3 ---
 3 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c
index 7766f4df4..2661f7775 100644
--- a/drivers/pci/devres.c
+++ b/drivers/pci/devres.c
@@ -150,13 +150,6 @@ EXPORT_SYMBOL(devm_pci_remap_cfg_resource);
  */
 int pcim_set_mwi(struct pci_dev *dev)
 {
-	struct pci_devres *dr;
-
-	dr = find_pci_dr(dev);
-	if (!dr)
-		return -ENOMEM;
-
-	dr->mwi = 1;
 	return pci_set_mwi(dev);
 }
 EXPORT_SYMBOL(pcim_set_mwi);
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e5f243dd4..2007edaaa 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4408,17 +4408,8 @@ void pci_intx(struct pci_dev *pdev, int enable)
 	else
 		new = pci_command | PCI_COMMAND_INTX_DISABLE;
 
-	if (new != pci_command) {
-		struct pci_devres *dr;
-
+	if (new != pci_command)
 		pci_write_config_word(pdev, PCI_COMMAND, new);
-
-		dr = find_pci_dr(pdev);
-		if (dr && !dr->restore_intx) {
-			dr->restore_intx = 1;
-			dr->orig_intx = !enable;
-		}
-	}
 }
 EXPORT_SYMBOL_GPL(pci_intx);
 
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 17fed1846..a1bb8191c 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -825,9 +825,6 @@ static inline pci_power_t mid_pci_get_power_state(struct pci_dev *pdev)
 struct pci_devres {
 	unsigned int enabled:1;
 	unsigned int pinned:1;
-	unsigned int orig_intx:1;
-	unsigned int restore_intx:1;
-	unsigned int mwi:1;
 	u32 region_mask;
 };
 
-- 
2.44.0






[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux