diff mbox

[5/6] staging/media/solo6x10: use module_pci_driver macro

Message ID 1341902726-22580-1-git-send-email-devendra.aaru@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Devendra Naga July 10, 2012, 6:45 a.m. UTC
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@gmail.com>
---
 drivers/staging/media/solo6x10/core.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Comments

Ezequiel Garcia July 10, 2012, 3:50 p.m. UTC | #1
Hi Devendra,

Thanks for the patch.

On Tue, Jul 10, 2012 at 3:45 AM, Devendra Naga <devendra.aaru@gmail.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@gmail.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);
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Since this driver belongs to staging/media you should not send this to
staging but to linux-media mailing list.
Also, the maintainer is Mauro, so it's not necessary to add Greg in Cc.

Also, I'm Ccing Ismael Luceno who seems to be currently working for bluecherry.
Ismael: Is it possible for you to test and/or ack this patch?

Thanks,
Ezequiel.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ismael Luceno July 17, 2012, 8:17 p.m. UTC | #2
On Tue, Jul 10, 2012 at 3:45 AM, Devendra Naga <devendra.aaru@gmail.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@gmail.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@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);