linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: convert gpio-i2cmux to use module_platform_driver()
@ 2012-01-08  1:35 Axel Lin
  2012-01-08 10:05 ` Jean Delvare
  2012-01-08 11:24 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-01-08  1:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Korsgaard, Jean Delvare (PC drivers, core),
	Ben Dooks (embedded platforms),
	linux-i2c

This patch converts gpio-i2cmux to use the module_platform_driver() macro which
makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/i2c/muxes/gpio-i2cmux.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/i2c/muxes/gpio-i2cmux.c b/drivers/i2c/muxes/gpio-i2cmux.c
index 7b6ce62..e5fa695 100644
--- a/drivers/i2c/muxes/gpio-i2cmux.c
+++ b/drivers/i2c/muxes/gpio-i2cmux.c
@@ -165,18 +165,7 @@ static struct platform_driver gpiomux_driver = {
 	},
 };
 
-static int __init gpiomux_init(void)
-{
-	return platform_driver_register(&gpiomux_driver);
-}
-
-static void __exit gpiomux_exit(void)
-{
-	platform_driver_unregister(&gpiomux_driver);
-}
-
-module_init(gpiomux_init);
-module_exit(gpiomux_exit);
+module_platform_driver(gpiomux_driver);
 
 MODULE_DESCRIPTION("GPIO-based I2C multiplexer driver");
 MODULE_AUTHOR("Peter Korsgaard <peter.korsgaard@barco.com>");
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: convert gpio-i2cmux to use module_platform_driver()
  2012-01-08  1:35 [PATCH] i2c: convert gpio-i2cmux to use module_platform_driver() Axel Lin
@ 2012-01-08 10:05 ` Jean Delvare
  2012-01-08 11:24 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2012-01-08 10:05 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Peter Korsgaard, Ben Dooks (embedded platforms), linux-i2c

On Sun, 08 Jan 2012 09:35:52 +0800, Axel Lin wrote:
> This patch converts gpio-i2cmux to use the module_platform_driver() macro which
> makes the code smaller and a bit simpler.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  drivers/i2c/muxes/gpio-i2cmux.c |   13 +------------
>  1 files changed, 1 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/i2c/muxes/gpio-i2cmux.c b/drivers/i2c/muxes/gpio-i2cmux.c
> index 7b6ce62..e5fa695 100644
> --- a/drivers/i2c/muxes/gpio-i2cmux.c
> +++ b/drivers/i2c/muxes/gpio-i2cmux.c
> @@ -165,18 +165,7 @@ static struct platform_driver gpiomux_driver = {
>  	},
>  };
>  
> -static int __init gpiomux_init(void)
> -{
> -	return platform_driver_register(&gpiomux_driver);
> -}
> -
> -static void __exit gpiomux_exit(void)
> -{
> -	platform_driver_unregister(&gpiomux_driver);
> -}
> -
> -module_init(gpiomux_init);
> -module_exit(gpiomux_exit);
> +module_platform_driver(gpiomux_driver);
>  
>  MODULE_DESCRIPTION("GPIO-based I2C multiplexer driver");
>  MODULE_AUTHOR("Peter Korsgaard <peter.korsgaard@barco.com>");

Applied, thanks!

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] i2c: convert gpio-i2cmux to use module_platform_driver()
  2012-01-08  1:35 [PATCH] i2c: convert gpio-i2cmux to use module_platform_driver() Axel Lin
  2012-01-08 10:05 ` Jean Delvare
@ 2012-01-08 11:24 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2012-01-08 11:24 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Jean Delvare (PC drivers, core),
	Ben Dooks (embedded platforms),
	linux-i2c

>>>>> "AL" == Axel Lin <axel.lin@gmail.com> writes:

AL> This patch converts gpio-i2cmux to use the module_platform_driver() macro which
AL> makes the code smaller and a bit simpler.

AL> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Peter Korsgaard <peter.korsgaard@barco.com>

-- 
Sorry about disclaimer - It's out of my control.
Bye, Peter Korsgaard


DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-08 11:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-08  1:35 [PATCH] i2c: convert gpio-i2cmux to use module_platform_driver() Axel Lin
2012-01-08 10:05 ` Jean Delvare
2012-01-08 11:24 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).