Tag: e7390d7c52684ea338621eb3826a60e33a2bab9d

w1: Use module_pci_driver

Author: Vaishali Thakkar <vthakkar1994@gmail.com> 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; @@ -static e(…) { …

Continue reading