diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 1ae9d6f653a9..6de28ea3cd65 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -754,14 +754,12 @@ static int _od_suspend_noirq(struct device *dev) | |||
754 | struct omap_device *od = to_omap_device(pdev); | 754 | struct omap_device *od = to_omap_device(pdev); |
755 | int ret; | 755 | int ret; |
756 | 756 | ||
757 | if (od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND) | ||
758 | return pm_generic_suspend_noirq(dev); | ||
759 | |||
760 | ret = pm_generic_suspend_noirq(dev); | 757 | ret = pm_generic_suspend_noirq(dev); |
761 | 758 | ||
762 | if (!ret && !pm_runtime_status_suspended(dev)) { | 759 | if (!ret && !pm_runtime_status_suspended(dev)) { |
763 | if (pm_generic_runtime_suspend(dev) == 0) { | 760 | if (pm_generic_runtime_suspend(dev) == 0) { |
764 | omap_device_idle(pdev); | 761 | if (!(od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND)) |
762 | omap_device_idle(pdev); | ||
765 | od->flags |= OMAP_DEVICE_SUSPENDED; | 763 | od->flags |= OMAP_DEVICE_SUSPENDED; |
766 | } | 764 | } |
767 | } | 765 | } |
@@ -774,13 +772,11 @@ static int _od_resume_noirq(struct device *dev) | |||
774 | struct platform_device *pdev = to_platform_device(dev); | 772 | struct platform_device *pdev = to_platform_device(dev); |
775 | struct omap_device *od = to_omap_device(pdev); | 773 | struct omap_device *od = to_omap_device(pdev); |
776 | 774 | ||
777 | if (od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND) | ||
778 | return pm_generic_resume_noirq(dev); | ||
779 | |||
780 | if ((od->flags & OMAP_DEVICE_SUSPENDED) && | 775 | if ((od->flags & OMAP_DEVICE_SUSPENDED) && |
781 | !pm_runtime_status_suspended(dev)) { | 776 | !pm_runtime_status_suspended(dev)) { |
782 | od->flags &= ~OMAP_DEVICE_SUSPENDED; | 777 | od->flags &= ~OMAP_DEVICE_SUSPENDED; |
783 | omap_device_enable(pdev); | 778 | if (!(od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND)) |
779 | omap_device_enable(pdev); | ||
784 | pm_generic_runtime_resume(dev); | 780 | pm_generic_runtime_resume(dev); |
785 | } | 781 | } |
786 | 782 | ||