diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-07-09 10:25:39 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-09 00:19:00 -0700 |
commit | 910be1abbec9cac102fde8ab6dd68a9b410ca441 (patch) | |
tree | 532213d0c28ad9d9a8ef84347c4cc8b8494d030b /scripts/gcc-version.sh | |
parent | 71d3c0b49a72fd092b7490b923d1721ceced8170 (diff) |
neterion: s2io: Use module_pci_driver
Use module_pci_driver for drivers whose init and exit functions
only register and unregister, respectively.
A simplified version of the Coccinelle semantic patch that performs
this transformation is as follows:
@a@
identifier f, x;
@@
-static f(...) { return pci_register_driver(&x); }
@b depends on a@
identifier e, a.x;
statement S;
@@
-static e(...) {
-pci_unregister_driver(&x);
-DBG_PRINT(INIT_DBG,"S");
- }
@c depends on a && b@
identifier a.f;
declarer name module_init;
@@
-module_init(f);
@d depends on a && b && c@
identifier b.e, a.x;
declarer name module_exit;
declarer name module_pci_driver;
@@
-module_exit(e);
+module_pci_driver(x);
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts/gcc-version.sh')
0 files changed, 0 insertions, 0 deletions