diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-07-04 05:49:09 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-10-01 12:15:21 +0200 |
commit | dc245cfa82f4dc1e9adf6b9190a9d7dfb1554ecf (patch) | |
tree | 8b0cf0403d571d9d3560a92d2bc7e2386822fa0b /drivers/scsi/pcmcia/sym53c500_cs.c | |
parent | pcmcia: remove KERN_INFO level from debug message (diff) | |
download | linux-dc245cfa82f4dc1e9adf6b9190a9d7dfb1554ecf.tar.xz linux-dc245cfa82f4dc1e9adf6b9190a9d7dfb1554ecf.zip |
pcmcia: Use module_pcmcia_driver for scsi drivers
Use module_pcmcia_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 pcmcia_register_driver(&x); }
@b depends on a@
identifier e, a.x;
@@
-static e(...) { pcmcia_unregister_driver(&x); }
@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_pcmcia_driver;
@@
-module_exit(e);
+module_pcmcia_driver(x);
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Cc: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
[linux@dominikbrodowski.net:
- updated commit message
- drop change to fdomain which got removed in the meantime]
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/scsi/pcmcia/sym53c500_cs.c')
-rw-r--r-- | drivers/scsi/pcmcia/sym53c500_cs.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index 20011c8afbb5..a3b63bea0e50 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c @@ -880,18 +880,4 @@ static struct pcmcia_driver sym53c500_cs_driver = { .id_table = sym53c500_ids, .resume = sym53c500_resume, }; - -static int __init -init_sym53c500_cs(void) -{ - return pcmcia_register_driver(&sym53c500_cs_driver); -} - -static void __exit -exit_sym53c500_cs(void) -{ - pcmcia_unregister_driver(&sym53c500_cs_driver); -} - -module_init(init_sym53c500_cs); -module_exit(exit_sym53c500_cs); +module_pcmcia_driver(sym53c500_cs_driver); |