diff mbox

[4/4] Scsi: a100u2w.c: Use module_pci_driver

Message ID 1443193731-12587-4-git-send-email-shraddha.6596@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shraddha Barke Sept. 25, 2015, 3:08 p.m. UTC
Use module_pci_driver for drivers whose init and exit functions
only register and unregister respectively

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/scsi/a100u2w.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

Comments

Hannes Reinecke Sept. 25, 2015, 3:33 p.m. UTC | #1
On 09/25/2015 05:08 PM, Shraddha Barke wrote:
> Use module_pci_driver for drivers whose init and exit functions
> only register and unregister respectively
> 
> Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
> ---
>  drivers/scsi/a100u2w.c | 14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)
> 
> diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
> index 8086bd0..5ef776c 100644
> --- a/drivers/scsi/a100u2w.c
> +++ b/drivers/scsi/a100u2w.c
> @@ -1222,19 +1222,7 @@ static struct pci_driver inia100_pci_driver = {
>  	.remove		= inia100_remove_one,
>  };
>  
> -static int __init inia100_init(void)
> -{
> -	return pci_register_driver(&inia100_pci_driver);
> -}
> -
> -static void __exit inia100_exit(void)
> -{
> -	pci_unregister_driver(&inia100_pci_driver);
> -}
> -
>  MODULE_DESCRIPTION("Initio A100U2W SCSI driver");
>  MODULE_AUTHOR("Initio Corporation");
>  MODULE_LICENSE("Dual BSD/GPL");
> -
> -module_init(inia100_init);
> -module_exit(inia100_exit);
> +module_pci_driver(inia100_pci_driver);
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox

Patch

diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index 8086bd0..5ef776c 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -1222,19 +1222,7 @@  static struct pci_driver inia100_pci_driver = {
 	.remove		= inia100_remove_one,
 };
 
-static int __init inia100_init(void)
-{
-	return pci_register_driver(&inia100_pci_driver);
-}
-
-static void __exit inia100_exit(void)
-{
-	pci_unregister_driver(&inia100_pci_driver);
-}
-
 MODULE_DESCRIPTION("Initio A100U2W SCSI driver");
 MODULE_AUTHOR("Initio Corporation");
 MODULE_LICENSE("Dual BSD/GPL");
-
-module_init(inia100_init);
-module_exit(inia100_exit);
+module_pci_driver(inia100_pci_driver);