Use module_pci_driver for drivers whose init and exit functions
only register and unregister
Signed-off-by: Shraddha Barke
---
drivers/scsi/initio.c | 14 +-
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 6a926ba..ea1
On Wed, 8 Jul 2015, Vaishali Thakkar wrote:
> 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;
> @
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
3 matches
Mail list logo