Commit ccb3bc16 authored by Magnus Damm's avatar Magnus Damm Committed by Ben Dooks

i2c-sh_mobile: change module_init() to subsys_initcall()

Convert the i2c-sh_mobile i2c bus driver to use
subsys_initcall() instead of module_init().

This change makes the driver register a bit earlier which
together with earlier platform data moves the time for probe().
The earlier probe() makes it possible to use i2c_get_adapter()
and i2c_transfer() from device_initcall().

The same strategy is used by other i2c bus drivers such as
i2c-pxa.c and i2c-s3c2410.c.
Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
[ben-linux@fluff.org: minor subject updaye]
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 783fd6fa
...@@ -637,7 +637,7 @@ static void __exit sh_mobile_i2c_adap_exit(void) ...@@ -637,7 +637,7 @@ static void __exit sh_mobile_i2c_adap_exit(void)
platform_driver_unregister(&sh_mobile_i2c_driver); platform_driver_unregister(&sh_mobile_i2c_driver);
} }
module_init(sh_mobile_i2c_adap_init); subsys_initcall(sh_mobile_i2c_adap_init);
module_exit(sh_mobile_i2c_adap_exit); module_exit(sh_mobile_i2c_adap_exit);
MODULE_DESCRIPTION("SuperH Mobile I2C Bus Controller driver"); MODULE_DESCRIPTION("SuperH Mobile I2C Bus Controller driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment