Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1503840
| From | Tomas Winkler <tomas.winkler@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [char-misc-next 2/5] watchdog: mei_wdt: use module_mei_cl_driver macro |
| Date | 2016-10-19 17:10 +0200 |
| Message-ID | <su0Fe-2Wq-87@gated-at.bofh.it> (permalink) |
| References | <su0Fc-2Wq-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Replace boilerplate driver registration with module_mei_cl_driver macro.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
drivers/watchdog/mei_wdt.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c
index 630bd189f167..116be477c8fd 100644
--- a/drivers/watchdog/mei_wdt.c
+++ b/drivers/watchdog/mei_wdt.c
@@ -699,25 +699,7 @@ static struct mei_cl_driver mei_wdt_driver = {
.remove = mei_wdt_remove,
};
-static int __init mei_wdt_init(void)
-{
- int ret;
-
- ret = mei_cldev_driver_register(&mei_wdt_driver);
- if (ret) {
- pr_err(KBUILD_MODNAME ": module registration failed\n");
- return ret;
- }
- return 0;
-}
-
-static void __exit mei_wdt_exit(void)
-{
- mei_cldev_driver_unregister(&mei_wdt_driver);
-}
-
-module_init(mei_wdt_init);
-module_exit(mei_wdt_exit);
+module_mei_cl_driver(mei_wdt_driver);
MODULE_AUTHOR("Intel Corporation");
MODULE_LICENSE("GPL");
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[char-misc-next 0/5] mei: mei client bus api changes Tomas Winkler <tomas.winkler@intel.com> - 2016-10-19 17:10 +0200
[char-misc-next 2/5] watchdog: mei_wdt: use module_mei_cl_driver macro Tomas Winkler <tomas.winkler@intel.com> - 2016-10-19 17:10 +0200
Re: [char-misc-next 2/5] watchdog: mei_wdt: use module_mei_cl_driver macro Guenter Roeck <linux@roeck-us.net> - 2016-10-20 03:50 +0200
[char-misc-next 3/5] nfc: mei: use module_mei_cl_driver macro Tomas Winkler <tomas.winkler@intel.com> - 2016-10-19 17:10 +0200
[char-misc-next 4/5] nfc: mei_phy: get phy from the driver data Tomas Winkler <tomas.winkler@intel.com> - 2016-10-19 17:50 +0200
csiph-web