[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32498e3c-dcb4-a136-1676-965df4533277@gmx.de>
Date: Wed, 7 Dec 2016 21:51:53 +0100
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: Tobias Klauser <tklauser@...tanz.ch>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] net: ethernet: slicoss: use module_pci_driver()
Hi Tobias,
On 07.12.2016 14:43, Tobias Klauser wrote:
> Use module_pci_driver() to get rid of some boilerplate code.
>
> Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
> ---
> drivers/net/ethernet/alacritech/slicoss.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/net/ethernet/alacritech/slicoss.c b/drivers/net/ethernet/alacritech/slicoss.c
> index e77ecd5b307c..b9fbd0107008 100644
> --- a/drivers/net/ethernet/alacritech/slicoss.c
> +++ b/drivers/net/ethernet/alacritech/slicoss.c
> @@ -1863,18 +1863,7 @@ static struct pci_driver slic_driver = {
> .remove = slic_remove,
> };
>
> -static int __init slic_init_module(void)
> -{
> - return pci_register_driver(&slic_driver);
> -}
> -
> -static void __exit slic_cleanup_module(void)
> -{
> - pci_unregister_driver(&slic_driver);
> -}
> -
> -module_init(slic_init_module);
> -module_exit(slic_cleanup_module);
> +module_pci_driver(slic_driver);
>
> MODULE_DESCRIPTION("Alacritech non-accelerated SLIC driver");
> MODULE_AUTHOR("Lino Sanfilippo <LinoSanfilippo@....de>");
>
Yes, makes sense.
Acked-by: Lino Sanfilippo <LinoSanfilippo@....de>
Thanks,
Lino
Powered by blists - more mailing lists