2013-05-23 12:00:31

by Libo Chen

[permalink] [raw]
Subject: [PATCH RFC v3 3/3] i2c: pxa: use module_platform_driver() replace init/exit

use module_platform_driver() macro to replace the module init/exit

Signed-off-by: Libo Chen <[email protected]>
---
drivers/i2c/busses/i2c-pxa.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 7b10102..e9c3524 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1242,15 +1242,7 @@ static struct platform_driver i2c_pxa_driver = {
.id_table = i2c_pxa_id_table,
};

-static int __init i2c_adap_pxa_init(void)
-{
- return platform_driver_register(&i2c_pxa_driver);
-}
-
-static void __exit i2c_adap_pxa_exit(void)
-{
- platform_driver_unregister(&i2c_pxa_driver);
-}
+module_platform_driver(i2c_pxa_driver);

MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:pxa2xx-i2c");
--
1.7.1


2013-05-23 13:48:27

by Libo Chen

[permalink] [raw]
Subject: Re: [PATCH RFC v3 3/3] i2c: pxa: use module_platform_driver() replace init/exit

maybe I make a mistake, please drop it.

?? 2013-5-23 20:00, Libo Chen ะด??:
> use module_platform_driver() macro to replace the module init/exit
>
> Signed-off-by: Libo Chen<[email protected]>
> ---
> drivers/i2c/busses/i2c-pxa.c | 10 +---------
> 1 files changed, 1 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
> index 7b10102..e9c3524 100644
> --- a/drivers/i2c/busses/i2c-pxa.c
> +++ b/drivers/i2c/busses/i2c-pxa.c
> @@ -1242,15 +1242,7 @@ static struct platform_driver i2c_pxa_driver = {
> .id_table = i2c_pxa_id_table,
> };
>
> -static int __init i2c_adap_pxa_init(void)
> -{
> - return platform_driver_register(&i2c_pxa_driver);
> -}
> -
> -static void __exit i2c_adap_pxa_exit(void)
> -{
> - platform_driver_unregister(&i2c_pxa_driver);
> -}
> +module_platform_driver(i2c_pxa_driver);
>
> MODULE_LICENSE("GPL");
> MODULE_ALIAS("platform:pxa2xx-i2c");

2013-06-12 10:01:21

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH RFC v3 3/3] i2c: pxa: use module_platform_driver() replace init/exit

On Thu, May 23, 2013 at 09:48:22PM +0800, Libo Chen wrote:
> maybe I make a mistake, please drop it.

Which mistake?


Attachments:
(No filename) (118.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2013-06-12 10:03:27

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH RFC v3 3/3] i2c: pxa: use module_platform_driver() replace init/exit

On Wed, Jun 12, 2013 at 12:03:13PM +0200, Wolfram Sang wrote:
> On Thu, May 23, 2013 at 09:48:22PM +0800, Libo Chen wrote:
> > maybe I make a mistake, please drop it.
>
> Which mistake?

Wrong window, now I see it.


Attachments:
(No filename) (217.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments