[1/1,media] davinci_vpfe: Use module_platform_driver macro

Message ID 1362484334-18804-1-git-send-email-sachin.kamat@linaro.org (mailing list archive)
State Superseded, archived
Headers

Commit Message

Sachin Kamat March 5, 2013, 11:52 a.m. UTC
  module_platform_driver() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 .../staging/media/davinci_vpfe/vpfe_mc_capture.c   |   20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)
  

Comments

Lad, Prabhakar March 5, 2013, 12:16 p.m. UTC | #1
Hi Sachin,

Thanks for the patch!

On Tue, Mar 5, 2013 at 5:22 PM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> module_platform_driver() eliminates the boilerplate and simplifies
> the code.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>

Regards,
--Prabhakar Lad

> ---
>  .../staging/media/davinci_vpfe/vpfe_mc_capture.c   |   20 +-------------------
>  1 files changed, 1 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
> index 7b35171..c7ae7d7 100644
> --- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
> +++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
> @@ -719,22 +719,4 @@ static struct platform_driver vpfe_driver = {
>         .remove = vpfe_remove,
>  };
>
> -/**
> - * vpfe_init : This function registers device driver
> - */
> -static __init int vpfe_init(void)
> -{
> -       /* Register driver to the kernel */
> -       return platform_driver_register(&vpfe_driver);
> -}
> -
> -/**
> - * vpfe_cleanup : This function un-registers device driver
> - */
> -static void vpfe_cleanup(void)
> -{
> -       platform_driver_unregister(&vpfe_driver);
> -}
> -
> -module_init(vpfe_init);
> -module_exit(vpfe_cleanup);
> +module_platform_driver(vpfe_driver);
> --
> 1.7.4.1
>
> --
> 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
--
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
  
Sachin Kamat March 7, 2013, 7:16 a.m. UTC | #2
On 5 March 2013 17:46, Prabhakar Lad <prabhakar.csengg@gmail.com> wrote:
> Hi Sachin,
>
> Thanks for the patch!
>
> On Tue, Mar 5, 2013 at 5:22 PM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> module_platform_driver() eliminates the boilerplate and simplifies
>> the code.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>
> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>

Thanks Prabhakar.
BTW, who is supposed to pick this patch?
  
Lad, Prabhakar March 7, 2013, 7:23 a.m. UTC | #3
Hi Sachin,

On Thu, Mar 7, 2013 at 12:46 PM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> On 5 March 2013 17:46, Prabhakar Lad <prabhakar.csengg@gmail.com> wrote:
>> Hi Sachin,
>>
>> Thanks for the patch!
>>
>> On Tue, Mar 5, 2013 at 5:22 PM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>>> module_platform_driver() eliminates the boilerplate and simplifies
>>> the code.
>>>
>>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>
>> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
>
> Thanks Prabhakar.
> BTW, who is supposed to pick this patch?
>
I'll queue it for 3.10 and a issue a pull request to Mauro soon.
Or if you have a branch and want to issue a pull no problem(anyways
I have Acked it). what do you suggest ?

Regards,
--Prabhakar Lad

> --
> With warm regards,
> Sachin
--
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
  
Sachin Kamat March 7, 2013, 8:06 a.m. UTC | #4
Hi Prabhakar,

>> BTW, who is supposed to pick this patch?
>>
> I'll queue it for 3.10 and a issue a pull request to Mauro soon.
> Or if you have a branch and want to issue a pull no problem(anyways
> I have Acked it). what do you suggest ?

Please queue it in your tree and go ahead with the pull request. That
sounds reasonable.
  
Lad, Prabhakar March 7, 2013, 11:23 a.m. UTC | #5
Hi Sachin,

On Thu, Mar 7, 2013 at 1:36 PM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> Hi Prabhakar,
>
>>> BTW, who is supposed to pick this patch?
>>>
>> I'll queue it for 3.10 and a issue a pull request to Mauro soon.
>> Or if you have a branch and want to issue a pull no problem(anyways
>> I have Acked it). what do you suggest ?
>
> Please queue it in your tree and go ahead with the pull request. That
> sounds reasonable.
>
Queued to my branch
http://git.linuxtv.org/mhadli/v4l-dvb-davinci_devices.git/shortlog/refs/heads/for_v3.10

Regards,
--Prabhakar

> --
> With warm regards,
> Sachin
--
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
  
Sachin Kamat March 11, 2013, 5:31 a.m. UTC | #6
>>
> Queued to my branch
> http://git.linuxtv.org/mhadli/v4l-dvb-davinci_devices.git/shortlog/refs/heads/for_v3.10

Thanks Prabhakar.

BTW, Manjunath's mail ID (manjunath.hadli@ti.com) bounces. Probably
you need to update the correct ID in the MAINTAINERS file?
  
Lad, Prabhakar March 11, 2013, 5:36 a.m. UTC | #7
Hi Sachin,

On Mon, Mar 11, 2013 at 11:01 AM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>>>
>> Queued to my branch
>> http://git.linuxtv.org/mhadli/v4l-dvb-davinci_devices.git/shortlog/refs/heads/for_v3.10
>
> Thanks Prabhakar.
>
> BTW, Manjunath's mail ID (manjunath.hadli@ti.com) bounces. Probably
> you need to update the correct ID in the MAINTAINERS file?
>
Yeah Manjunath and me have stopped working with TI, but although
I'll be maintaining Davinci media with my personal Id. I will soon post the
patch updating the  MAINTAINERS file.

Regards,
--Prabhakar Lad

> --
> With warm regards,
> Sachin
--
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
  
Sachin Kamat March 11, 2013, 5:37 a.m. UTC | #8
On 11 March 2013 11:06, Prabhakar Lad <prabhakar.csengg@gmail.com> wrote:
> Hi Sachin,
>
> On Mon, Mar 11, 2013 at 11:01 AM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>>>>
>>> Queued to my branch
>>> http://git.linuxtv.org/mhadli/v4l-dvb-davinci_devices.git/shortlog/refs/heads/for_v3.10
>>
>> Thanks Prabhakar.
>>
>> BTW, Manjunath's mail ID (manjunath.hadli@ti.com) bounces. Probably
>> you need to update the correct ID in the MAINTAINERS file?
>>
> Yeah Manjunath and me have stopped working with TI, but although
> I'll be maintaining Davinci media with my personal Id. I will soon post the
> patch updating the  MAINTAINERS file.

Oh OK.
  

Patch

diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
index 7b35171..c7ae7d7 100644
--- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
+++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
@@ -719,22 +719,4 @@  static struct platform_driver vpfe_driver = {
 	.remove = vpfe_remove,
 };
 
-/**
- * vpfe_init : This function registers device driver
- */
-static __init int vpfe_init(void)
-{
-	/* Register driver to the kernel */
-	return platform_driver_register(&vpfe_driver);
-}
-
-/**
- * vpfe_cleanup : This function un-registers device driver
- */
-static void vpfe_cleanup(void)
-{
-	platform_driver_unregister(&vpfe_driver);
-}
-
-module_init(vpfe_init);
-module_exit(vpfe_cleanup);
+module_platform_driver(vpfe_driver);