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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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@xxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@xxxxxxx			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux