diff mbox series

[RFC,v3,3/4] watchdog: core: add module_watchdog_pci_driver()

Message ID 20180829074241.1943-4-wsa+renesas@sang-engineering.com (mailing list archive)
State Under Review
Delegated to: Geert Uytterhoeven
Headers show
Series watchdog: prevent removing a driver if NOWAYOUT | expand

Commit Message

Wolfram Sang Aug. 29, 2018, 7:42 a.m. UTC
Allow PCI drivers to prevent removing if NOWAYOUT, too.

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

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 include/linux/watchdog.h | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
index c8ecbc53c807..7f097d6f94d4 100644
--- a/include/linux/watchdog.h
+++ b/include/linux/watchdog.h
@@ -233,4 +233,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 */