Merge tag 'driver-core-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / clocksource / sh_mtu2.c
index 62812f80b5cc0916d3a38146ac6b3b75c4b9915f..64526e50d471c1f096b372a69fbaee1d2948da4b 100644 (file)
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 
+#ifdef CONFIG_SUPERH
+#include <asm/platform_early.h>
+#endif
+
 struct sh_mtu2_device;
 
 struct sh_mtu2_channel {
@@ -448,7 +452,7 @@ static int sh_mtu2_probe(struct platform_device *pdev)
        struct sh_mtu2_device *mtu = platform_get_drvdata(pdev);
        int ret;
 
-       if (!is_early_platform_device(pdev)) {
+       if (!is_sh_early_platform_device(pdev)) {
                pm_runtime_set_active(&pdev->dev);
                pm_runtime_enable(&pdev->dev);
        }
@@ -468,7 +472,7 @@ static int sh_mtu2_probe(struct platform_device *pdev)
                pm_runtime_idle(&pdev->dev);
                return ret;
        }
-       if (is_early_platform_device(pdev))
+       if (is_sh_early_platform_device(pdev))
                return 0;
 
  out:
@@ -517,7 +521,10 @@ static void __exit sh_mtu2_exit(void)
        platform_driver_unregister(&sh_mtu2_device_driver);
 }
 
-early_platform_init("earlytimer", &sh_mtu2_device_driver);
+#ifdef CONFIG_SUPERH
+sh_early_platform_init("earlytimer", &sh_mtu2_device_driver);
+#endif
+
 subsys_initcall(sh_mtu2_init);
 module_exit(sh_mtu2_exit);