7442d756df9f27d7724ea4ff22cbd8cfaec3c40b
[openwrt/staging/chunkeey.git] / target / linux / mediatek / patches-4.4 / 0003-soc-mediatek-Init-MT8173-scpsys-driver-earlier.patch
1 From c359272f86805259c5801385d60fdeea9d629cf9 Mon Sep 17 00:00:00 2001
2 From: James Liao <jamesjj.liao@mediatek.com>
3 Date: Wed, 30 Dec 2015 14:41:44 +0800
4 Subject: [PATCH 03/81] soc: mediatek: Init MT8173 scpsys driver earlier
5
6 Some power domain comsumers may init before module_init.
7 So the power domain provider (scpsys) need to be initialized
8 earlier too.
9
10 Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
11 ---
12 drivers/soc/mediatek/mtk-scpsys-mt8173.c | 13 ++++++++++++-
13 1 file changed, 12 insertions(+), 1 deletion(-)
14
15 --- a/drivers/soc/mediatek/mtk-scpsys-mt8173.c
16 +++ b/drivers/soc/mediatek/mtk-scpsys-mt8173.c
17 @@ -176,4 +176,15 @@ static struct platform_driver scpsys_drv
18 },
19 };
20
21 -module_platform_driver_probe(scpsys_drv, scpsys_probe);
22 +static int __init scpsys_drv_init(void)
23 +{
24 + return platform_driver_probe(&scpsys_drv, scpsys_probe);
25 +}
26 +
27 +static void __exit scpsys_drv_exit(void)
28 +{
29 + platform_driver_unregister(&scpsys_drv);
30 +}
31 +
32 +subsys_initcall(scpsys_drv_init);
33 +module_exit(scpsys_drv_exit);