diff mbox

[1/2] pci: Add reciprocal function for pci_ignore_hotplug()

Message ID 20150224201233.14443.61523.stgit@gimli.home (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Alex Williamson Feb. 24, 2015, 8:12 p.m. UTC
We have pci_ignore_hotplug(), but there's no way to undo this
without manipulating the device itself.  It seems like the original
intention of the function is to provide the driver with a way to
ignore hotplug over a specific time window, ex. the time while the
device is powered off.  Once the device is powered on again, the
flag should be cleared to avoid leaving driver cruft on the device.
Add a trivial helper function to enable this.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
 include/linux/pci.h |    5 +++++
 1 file changed, 5 insertions(+)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 211e9da..26f9779 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1044,6 +1044,11 @@  static inline void pci_ignore_hotplug(struct pci_dev *dev)
 	dev->ignore_hotplug = 1;
 }
 
+static inline void pci_unignore_hotplug(struct pci_dev *dev)
+{
+	dev->ignore_hotplug = 0;
+}
+
 static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state,
 				  bool enable)
 {