aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/plat-omap/include/plat/omap_device.h2
-rw-r--r--arch/arm/plat-omap/omap-pm-noop.c2
-rw-r--r--arch/arm/plat-omap/omap_device.c12
3 files changed, 4 insertions, 12 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 05f7615b61f0..4327b2c90c3d 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -36,7 +36,7 @@
36 36
37#include <plat/omap_hwmod.h> 37#include <plat/omap_hwmod.h>
38 38
39extern struct device omap_device_parent; 39extern struct dev_pm_domain omap_device_pm_domain;
40 40
41/* omap_device._state values */ 41/* omap_device._state values */
42#define OMAP_DEVICE_STATE_UNKNOWN 0 42#define OMAP_DEVICE_STATE_UNKNOWN 0
diff --git a/arch/arm/plat-omap/omap-pm-noop.c b/arch/arm/plat-omap/omap-pm-noop.c
index 3dc3801aace4..5a97b4d98d41 100644
--- a/arch/arm/plat-omap/omap-pm-noop.c
+++ b/arch/arm/plat-omap/omap-pm-noop.c
@@ -319,7 +319,7 @@ int omap_pm_get_dev_context_loss_count(struct device *dev)
319 if (WARN_ON(!dev)) 319 if (WARN_ON(!dev))
320 return -ENODEV; 320 return -ENODEV;
321 321
322 if (dev->parent == &omap_device_parent) { 322 if (dev->pm_domain == &omap_device_pm_domain) {
323 count = omap_device_get_context_loss_count(pdev); 323 count = omap_device_get_context_loss_count(pdev);
324 } else { 324 } else {
325 WARN_ONCE(off_mode_enabled, "omap_pm: using dummy context loss counter; device %s should be converted to omap_device", 325 WARN_ONCE(off_mode_enabled, "omap_pm: using dummy context loss counter; device %s should be converted to omap_device",
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 2d00ab01d150..1ae9d6f653a9 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -314,8 +314,6 @@ static void _add_hwmod_clocks_clkdev(struct omap_device *od,
314} 314}
315 315
316 316
317static struct dev_pm_domain omap_device_pm_domain;
318
319/** 317/**
320 * omap_device_build_from_dt - build an omap_device with multiple hwmods 318 * omap_device_build_from_dt - build an omap_device with multiple hwmods
321 * @pdev_name: name of the platform_device driver to use 319 * @pdev_name: name of the platform_device driver to use
@@ -793,7 +791,7 @@ static int _od_resume_noirq(struct device *dev)
793#define _od_resume_noirq NULL 791#define _od_resume_noirq NULL
794#endif 792#endif
795 793
796static struct dev_pm_domain omap_device_pm_domain = { 794struct dev_pm_domain omap_device_pm_domain = {
797 .ops = { 795 .ops = {
798 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, 796 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume,
799 _od_runtime_idle) 797 _od_runtime_idle)
@@ -815,7 +813,6 @@ int omap_device_register(struct platform_device *pdev)
815{ 813{
816 pr_debug("omap_device: %s: registering\n", pdev->name); 814 pr_debug("omap_device: %s: registering\n", pdev->name);
817 815
818 pdev->dev.parent = &omap_device_parent;
819 pdev->dev.pm_domain = &omap_device_pm_domain; 816 pdev->dev.pm_domain = &omap_device_pm_domain;
820 return platform_device_add(pdev); 817 return platform_device_add(pdev);
821} 818}
@@ -1124,11 +1121,6 @@ int omap_device_enable_clocks(struct omap_device *od)
1124 return 0; 1121 return 0;
1125} 1122}
1126 1123
1127struct device omap_device_parent = {
1128 .init_name = "omap",
1129 .parent = &platform_bus,
1130};
1131
1132static struct notifier_block platform_nb = { 1124static struct notifier_block platform_nb = {
1133 .notifier_call = _omap_device_notifier_call, 1125 .notifier_call = _omap_device_notifier_call,
1134}; 1126};
@@ -1136,6 +1128,6 @@ static struct notifier_block platform_nb = {
1136static int __init omap_device_init(void) 1128static int __init omap_device_init(void)
1137{ 1129{
1138 bus_register_notifier(&platform_bus_type, &platform_nb); 1130 bus_register_notifier(&platform_bus_type, &platform_nb);
1139 return device_register(&omap_device_parent); 1131 return 0;
1140} 1132}
1141core_initcall(omap_device_init); 1133core_initcall(omap_device_init);