Message ID | 20150224201233.14443.61523.stgit@gimli.home (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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) {
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(+)