rockchip: i2s: use subysys_initcall_sync for probe.
authorSugar Zhang <sugar.zhang@rock-chips.com>
Mon, 2 Mar 2015 00:50:41 +0000 (08:50 +0800)
committerSugar Zhang <sugar.zhang@rock-chips.com>
Mon, 2 Mar 2015 00:55:26 +0000 (08:55 +0800)
because some codecs initialization depends on i2s mclk.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
sound/soc/rockchip/rk30_i2s.c

index 3c8b5d250ab2179672e6a7740cb7ae08df57160a..55aeefeb31caf9debaa514bd54e4d98e357cf707 100755 (executable)
@@ -724,7 +724,18 @@ static struct platform_driver rockchip_i2s_driver = {
                .pm     = &rockchip_i2s_pm_ops,
        },
 };
-module_platform_driver(rockchip_i2s_driver);
+
+static int __init rockchip_i2s_init(void)
+{
+       return platform_driver_register(&rockchip_i2s_driver);
+}
+subsys_initcall_sync(rockchip_i2s_init);
+
+static void __exit rockchip_i2s_exit(void)
+{
+       platform_driver_unregister(&rockchip_i2s_driver);
+}
+module_exit(rockchip_i2s_exit);
 
 /* Module information */
 MODULE_AUTHOR("rockchip");