diff options
author | Kevin Hilman <khilman@ti.com> | 2012-02-15 14:47:45 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2012-03-05 18:38:02 -0500 |
commit | 3ec2decbb6dfcdbbb6e6a8ddf5adc7edbc429ed7 (patch) | |
tree | 5b53e02a27c31fb6bd3ba57de2d8d51c9347d710 /arch/arm/plat-omap/omap_device.c | |
parent | 401606fd708885d28ce3c14a2a8fe612f8a6b50f (diff) |
ARM: OMAP: omap_device: remove omap_device_parent
Currently all omap_devices are forced to have the dummy device
'omap_device_parent' as a parent. This was used to distinguish
omap_devices from "normal" platform_devices in the OMAP PM core code.
Now that we implement the PM core using PM domains, this is no longer
needed, and is removed.
This also frees up omap_devices to have a more complex parent/child
relationships that model actual device relationships.
The only in-tree user of omap_device_parent was the OMAP PM layer to
handle lost-context count for omap_devices. That is now converted to
use the presence of the omap_device_pm_domain instead.
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/plat-omap/omap_device.c')
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 12 |
1 files changed, 2 insertions, 10 deletions
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 | ||
317 | static 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 | ||
796 | static struct dev_pm_domain omap_device_pm_domain = { | 794 | struct 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 | ||
1127 | struct device omap_device_parent = { | ||
1128 | .init_name = "omap", | ||
1129 | .parent = &platform_bus, | ||
1130 | }; | ||
1131 | |||
1132 | static struct notifier_block platform_nb = { | 1124 | static 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 = { | |||
1136 | static int __init omap_device_init(void) | 1128 | static 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 | } |
1141 | core_initcall(omap_device_init); | 1133 | core_initcall(omap_device_init); |