linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] powerpc: 83xx: use module_i2c_driver macro
@ 2012-10-13 19:05 Devendra Naga
  2012-10-16 18:06 ` Kim Phillips
  0 siblings, 1 reply; 4+ messages in thread
From: Devendra Naga @ 2012-10-13 19:05 UTC (permalink / raw)
  To: Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: Devendra Naga

replace the module init and exit calls containing the
i2c_add_driver and i2c_del_driver with the module_i2c_driver
macro as it does the same things as the code that is removed

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---

 Not compile tested, because i dont have a ppc cross toolchain
 arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
index ef6537b..d27477b 100644
--- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
+++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
@@ -232,18 +232,7 @@ static struct i2c_driver mcu_driver = {
 	.id_table = mcu_ids,
 };
 
-static int __init mcu_init(void)
-{
-	return i2c_add_driver(&mcu_driver);
-}
-module_init(mcu_init);
-
-static void __exit mcu_exit(void)
-{
-	i2c_del_driver(&mcu_driver);
-}
-module_exit(mcu_exit);
-
+module_i2c_driver(mcu_driver);
 MODULE_DESCRIPTION("Power Management and GPIO expander driver for "
 		   "MPC8349E-mITX-compatible MCU");
 MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
-- 
1.7.1

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

* Re: [PATCH 1/9] powerpc: 83xx: use module_i2c_driver macro
  2012-10-13 19:05 [PATCH 1/9] powerpc: 83xx: use module_i2c_driver macro Devendra Naga
@ 2012-10-16 18:06 ` Kim Phillips
  0 siblings, 0 replies; 4+ messages in thread
From: Kim Phillips @ 2012-10-16 18:06 UTC (permalink / raw)
  To: Devendra Naga; +Cc: linuxppc-dev, Paul Mackerras

On Sat, 13 Oct 2012 15:05:42 -0400
Devendra Naga <devendra.aaru@gmail.com> wrote:

> replace the module init and exit calls containing the
> i2c_add_driver and i2c_del_driver with the module_i2c_driver
> macro as it does the same things as the code that is removed
> 
> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
> ---
> 
>  Not compile tested,

Tested-by: Kim Phillips <kim.phillips@freescale.com>

> because i dont have a ppc cross toolchain

fyi, ppc and more cross compilers are available here:

http://kernel.org/pub/tools/crosstool/

Kim

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

* Re: [PATCH 1/9] powerpc: 83xx: use module_i2c_driver macro
  2012-10-13 19:03 Devendra Naga
@ 2012-10-13 19:04 ` devendra.aaru
  0 siblings, 0 replies; 4+ messages in thread
From: devendra.aaru @ 2012-10-13 19:04 UTC (permalink / raw)
  To: Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: Devendra Naga

whoops, sorry, i made mistake in the patchset numbering,

please ignore this patch i will send a patch with the updated correct
number. actually there is only one patch. no 9 patches,

sorry for the noise,

devendra

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

* [PATCH 1/9] powerpc: 83xx: use module_i2c_driver macro
@ 2012-10-13 19:03 Devendra Naga
  2012-10-13 19:04 ` devendra.aaru
  0 siblings, 1 reply; 4+ messages in thread
From: Devendra Naga @ 2012-10-13 19:03 UTC (permalink / raw)
  To: Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: Devendra Naga

replace the module init and exit calls containing the
i2c_add_driver and i2c_del_driver with the module_i2c_driver
macro as it does the same things as the code that is removed

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---

 Not compile tested, because i dont have a ppc cross toolchain
 arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
index ef6537b..d27477b 100644
--- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
+++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
@@ -232,18 +232,7 @@ static struct i2c_driver mcu_driver = {
 	.id_table = mcu_ids,
 };
 
-static int __init mcu_init(void)
-{
-	return i2c_add_driver(&mcu_driver);
-}
-module_init(mcu_init);
-
-static void __exit mcu_exit(void)
-{
-	i2c_del_driver(&mcu_driver);
-}
-module_exit(mcu_exit);
-
+module_i2c_driver(mcu_driver);
 MODULE_DESCRIPTION("Power Management and GPIO expander driver for "
 		   "MPC8349E-mITX-compatible MCU");
 MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
-- 
1.7.1

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

end of thread, other threads:[~2012-10-16 18:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-13 19:05 [PATCH 1/9] powerpc: 83xx: use module_i2c_driver macro Devendra Naga
2012-10-16 18:06 ` Kim Phillips
  -- strict thread matches above, loose matches on Subject: below --
2012-10-13 19:03 Devendra Naga
2012-10-13 19:04 ` devendra.aaru

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