linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: tca6416-keypad: Change to module_init()
@ 2011-03-22 14:26 Magnus Damm
  2011-03-22 14:28 ` Mark Brown
  0 siblings, 1 reply; 17+ messages in thread
From: Magnus Damm @ 2011-03-22 14:26 UTC (permalink / raw)
  To: dmitry.torokhov
  Cc: srk, khilman, chinyeow.sim.xt, linux-sh, tony, nsekhar, linux-i2c,
	linux-input, Magnus Damm, linux-omap, linux-arm-kernel

From: Magnus Damm <damm@opensource.se>

The tca6416 driver makes use of the I2C bus for chatting
with the actual hardware device. Without this patch both
the I2C bus driver and the tca6416 driver are initialized
at the subsys_initcall() level. This may lead to problems
with the tca6416 driver being initialized before the I2C
bus driver.

By using module_init() in the tca6416 driver we make sure
the I2C bus driver always is initialized before the keypad
driver.

With this patch applied the boot order becomes:
 - arch_initcall: the ARM architecture ->init_machine()
 - arch_initcall: i2c_register_board_info()
 - arch_initcall: I2C bus device registration
 - subsys_initcall: I2C bus driver probe()
 - module_init: tca6416 driver probe()

Affects the following in-tree platforms:
 - arch/arm/mach-davinci/board-da850-evm.c
 - arch/arm/mach-omap2/board-am3517evm.c
 - arch/arm/mach-shmobile/board-mackerel.c

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/input/keyboard/tca6416-keypad.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 0001/drivers/input/keyboard/tca6416-keypad.c
+++ work/drivers/input/keyboard/tca6416-keypad.c	2011-03-22 22:44:26.000000000 +0900
@@ -369,7 +369,7 @@ static int __init tca6416_keypad_init(vo
 	return i2c_add_driver(&tca6416_keypad_driver);
 }
 
-subsys_initcall(tca6416_keypad_init);
+module_init(tca6416_keypad_init);
 
 static void __exit tca6416_keypad_exit(void)
 {

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

end of thread, other threads:[~2011-03-29  7:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 14:26 [PATCH] Input: tca6416-keypad: Change to module_init() Magnus Damm
2011-03-22 14:28 ` Mark Brown
2011-03-22 14:33   ` Paul Mundt
2011-03-22 15:22     ` Magnus Damm
2011-03-22 15:32       ` Paul Mundt
2011-03-22 15:43         ` Magnus Damm
     [not found]           ` <AANLkTimyxdcJ-eEke9x7X1zdiJNbFtncfv0=NzKjtAme-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-22 15:57             ` Paul Mundt
2011-03-22 16:20               ` Magnus Damm
2011-03-22 16:31                 ` Mark Brown
     [not found]                   ` <20110322163144.GC2202-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2011-03-22 16:51                     ` Magnus Damm
2011-03-22 16:59                       ` Mark Brown
     [not found]                         ` <20110322165907.GG22583-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2011-03-23 16:04                           ` Magnus Damm
2011-03-23 16:20                             ` Mark Brown
     [not found]                               ` <20110323162021.GA26594-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2011-03-24  3:38                                 ` Magnus Damm
2011-03-24  7:57                                   ` Dmitry Torokhov
2011-03-29  7:11                             ` Magnus Damm
2011-03-22 15:16   ` Magnus Damm

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