[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADThq4Jist-h4UdNTEtmktt0NzibZSZnHrW4qaAM_g2xrzBaCw@mail.gmail.com>
Date: Tue, 17 Jul 2012 17:17:52 -0300
From: Ismael Luceno <ismael.luceno@...il.com>
To: Devendra Naga <devendra.aaru@...il.com>
Cc: Ben Collins <bcollins@...echerry.net>,
Mauro Carvalho Chehab <mchehab@...radead.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrew Miller <amiller@...lx.com>, linux-media@...r.kernel.org,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/6] staging/media/solo6x10: use module_pci_driver macro
On Tue, Jul 10, 2012 at 3:45 AM, Devendra Naga <devendra.aaru@...il.com> wrote:
> the driver duplicates the module_pci_driver code,
> how?
> module_pci_driver is used for those drivers whose
> init and exit paths does only register and unregister
> to pci API and nothing else.
>
> so use the module_pci_driver macro instead
>
> Signed-off-by: Devendra Naga <devendra.aaru@...il.com>
> ---
> drivers/staging/media/solo6x10/core.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/staging/media/solo6x10/core.c b/drivers/staging/media/solo6x10/core.c
> index d2fd842..3ee9b12 100644
> --- a/drivers/staging/media/solo6x10/core.c
> +++ b/drivers/staging/media/solo6x10/core.c
> @@ -318,15 +318,4 @@ static struct pci_driver solo_pci_driver = {
> .remove = solo_pci_remove,
> };
>
> -static int __init solo_module_init(void)
> -{
> - return pci_register_driver(&solo_pci_driver);
> -}
> -
> -static void __exit solo_module_exit(void)
> -{
> - pci_unregister_driver(&solo_pci_driver);
> -}
> -
> -module_init(solo_module_init);
> -module_exit(solo_module_exit);
> +module_pci_driver(solo_pci_driver);
Acked-by: Ismael Luceno <ismael.luceno@...il.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists