diff mbox

[1/6] mtd: s3c2410: Use module_platform_driver()

Message ID 1342434747-27622-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat July 16, 2012, 10:32 a.m. UTC
This makes the code simpler by eliminating module_init() and
module_exit().

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/mtd/nand/s3c2410.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)

Comments

Sachin Kamat Aug. 3, 2012, 4:47 a.m. UTC | #1
Hi,

Any comments on this series?

On 16 July 2012 16:02, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> This makes the code simpler by eliminating module_init() and
> module_exit().
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/mtd/nand/s3c2410.c |   15 +--------------
>  1 files changed, 1 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
> index 91121f3..8f9267f 100644
> --- a/drivers/mtd/nand/s3c2410.c
> +++ b/drivers/mtd/nand/s3c2410.c
> @@ -1134,20 +1134,7 @@ static struct platform_driver s3c24xx_nand_driver = {
>         },
>  };
>
> -static int __init s3c2410_nand_init(void)
> -{
> -       printk("S3C24XX NAND Driver, (c) 2004 Simtec Electronics\n");
> -
> -       return platform_driver_register(&s3c24xx_nand_driver);
> -}
> -
> -static void __exit s3c2410_nand_exit(void)
> -{
> -       platform_driver_unregister(&s3c24xx_nand_driver);
> -}
> -
> -module_init(s3c2410_nand_init);
> -module_exit(s3c2410_nand_exit);
> +module_platform_driver(s3c24xx_nand_driver);
>
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
> --
> 1.7.4.1
>
Sachin Kamat Aug. 8, 2012, 9:30 a.m. UTC | #2
ping...

On 3 August 2012 10:17, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> Hi,
>
> Any comments on this series?
>
> On 16 July 2012 16:02, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> This makes the code simpler by eliminating module_init() and
>> module_exit().
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>>  drivers/mtd/nand/s3c2410.c |   15 +--------------
>>  1 files changed, 1 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
>> index 91121f3..8f9267f 100644
>> --- a/drivers/mtd/nand/s3c2410.c
>> +++ b/drivers/mtd/nand/s3c2410.c
>> @@ -1134,20 +1134,7 @@ static struct platform_driver s3c24xx_nand_driver = {
>>         },
>>  };
>>
>> -static int __init s3c2410_nand_init(void)
>> -{
>> -       printk("S3C24XX NAND Driver, (c) 2004 Simtec Electronics\n");
>> -
>> -       return platform_driver_register(&s3c24xx_nand_driver);
>> -}
>> -
>> -static void __exit s3c2410_nand_exit(void)
>> -{
>> -       platform_driver_unregister(&s3c24xx_nand_driver);
>> -}
>> -
>> -module_init(s3c2410_nand_init);
>> -module_exit(s3c2410_nand_exit);
>> +module_platform_driver(s3c24xx_nand_driver);
>>
>>  MODULE_LICENSE("GPL");
>>  MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
>> --
>> 1.7.4.1
>>
>
>
>
> --
> With warm regards,
> Sachin
Sachin Kamat Aug. 16, 2012, 5:23 a.m. UTC | #3
ping ...

On 8 August 2012 15:00, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> ping...
>
> On 3 August 2012 10:17, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> Hi,
>>
>> Any comments on this series?
>>
>> On 16 July 2012 16:02, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>>> This makes the code simpler by eliminating module_init() and
>>> module_exit().
>>>
>>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>>> ---
>>>  drivers/mtd/nand/s3c2410.c |   15 +--------------
>>>  1 files changed, 1 insertions(+), 14 deletions(-)
>>>
>>> diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
>>> index 91121f3..8f9267f 100644
>>> --- a/drivers/mtd/nand/s3c2410.c
>>> +++ b/drivers/mtd/nand/s3c2410.c
>>> @@ -1134,20 +1134,7 @@ static struct platform_driver s3c24xx_nand_driver = {
>>>         },
>>>  };
>>>
>>> -static int __init s3c2410_nand_init(void)
>>> -{
>>> -       printk("S3C24XX NAND Driver, (c) 2004 Simtec Electronics\n");
>>> -
>>> -       return platform_driver_register(&s3c24xx_nand_driver);
>>> -}
>>> -
>>> -static void __exit s3c2410_nand_exit(void)
>>> -{
>>> -       platform_driver_unregister(&s3c24xx_nand_driver);
>>> -}
>>> -
>>> -module_init(s3c2410_nand_init);
>>> -module_exit(s3c2410_nand_exit);
>>> +module_platform_driver(s3c24xx_nand_driver);
>>>
>>>  MODULE_LICENSE("GPL");
>>>  MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
>>> --
>>> 1.7.4.1
>>>
>>
>>
>>
>> --
>> With warm regards,
>> Sachin
>
>
>
> --
> With warm regards,
> Sachin
Artem Bityutskiy Aug. 17, 2012, 12:46 p.m. UTC | #4
On Mon, 2012-07-16 at 16:02 +0530, Sachin Kamat wrote:
> This makes the code simpler by eliminating module_init() and
> module_exit().
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Could you please send me a defconfig which I can use to compile-test
this?
Sachin Kamat Aug. 18, 2012, 6:21 a.m. UTC | #5
Hi Artem,

Thank you for your interest in testing these patches.

On 17 August 2012 18:16, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Mon, 2012-07-16 at 16:02 +0530, Sachin Kamat wrote:
>> This makes the code simpler by eliminating module_init() and
>> module_exit().
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>
> Could you please send me a defconfig which I can use to compile-test
> this?

This patch along with other 5 patches in this series can be tested
using the s3c6400_defconfig (it is available in the mainline).
Please let me know how it works for you.

>
> --
> Best Regards,
> Artem Bityutskiy
diff mbox

Patch

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 91121f3..8f9267f 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -1134,20 +1134,7 @@  static struct platform_driver s3c24xx_nand_driver = {
 	},
 };
 
-static int __init s3c2410_nand_init(void)
-{
-	printk("S3C24XX NAND Driver, (c) 2004 Simtec Electronics\n");
-
-	return platform_driver_register(&s3c24xx_nand_driver);
-}
-
-static void __exit s3c2410_nand_exit(void)
-{
-	platform_driver_unregister(&s3c24xx_nand_driver);
-}
-
-module_init(s3c2410_nand_init);
-module_exit(s3c2410_nand_exit);
+module_platform_driver(s3c24xx_nand_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");