Allow PCI drivers to prevent removing if NOWAYOUT, too.

Note: This is only a build-tested proof-of-concept!

Signed-off-by: Wolfram Sang <[email protected]>
---
 include/linux/watchdog.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
index 5768fb6b5cde..07c01e8050e8 100644
--- a/include/linux/watchdog.h
+++ b/include/linux/watchdog.h
@@ -236,4 +236,8 @@ module_exit(__driver##_exit)
        module_watchdog_driver(__platform_driver, platform_driver_register, \
                                platform_driver_unregister, __nowayout)
 
+#define module_watchdog_pci_driver(__pci_driver, __nowayout) \
+       module_watchdog_driver(__pci_driver, pci_register_driver, \
+                               pci_unregister_driver, __nowayout)
+
 #endif  /* ifndef _LINUX_WATCHDOG_H */
-- 
2.11.0

Reply via email to