diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-07-08 07:23:07 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-07-21 18:28:39 -0400 |
commit | 511647ff58fd0f1c1f415d2c757d841650edac91 (patch) | |
tree | 8df47b78208093d7f06d7e305d013e4cb85e6275 /drivers/base | |
parent | 48fea9659ec1a35641db3832adaf3860ecabb6ba (diff) |
PM: Remove platform device suspend_late()/resume_early() V2
This is V2 of the platform driver power management late/early
callback removal patch. The callbacks ->suspend_late() and
->resume_early() are removed since all in-tree users now have
been migrated to dev_pm_ops.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/platform.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 81cb01bfc356..455e55971d0e 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -628,30 +628,6 @@ static int platform_legacy_suspend(struct device *dev, pm_message_t mesg) | |||
628 | return ret; | 628 | return ret; |
629 | } | 629 | } |
630 | 630 | ||
631 | static int platform_legacy_suspend_late(struct device *dev, pm_message_t mesg) | ||
632 | { | ||
633 | struct platform_driver *pdrv = to_platform_driver(dev->driver); | ||
634 | struct platform_device *pdev = to_platform_device(dev); | ||
635 | int ret = 0; | ||
636 | |||
637 | if (dev->driver && pdrv->suspend_late) | ||
638 | ret = pdrv->suspend_late(pdev, mesg); | ||
639 | |||
640 | return ret; | ||
641 | } | ||
642 | |||
643 | static int platform_legacy_resume_early(struct device *dev) | ||
644 | { | ||
645 | struct platform_driver *pdrv = to_platform_driver(dev->driver); | ||
646 | struct platform_device *pdev = to_platform_device(dev); | ||
647 | int ret = 0; | ||
648 | |||
649 | if (dev->driver && pdrv->resume_early) | ||
650 | ret = pdrv->resume_early(pdev); | ||
651 | |||
652 | return ret; | ||
653 | } | ||
654 | |||
655 | static int platform_legacy_resume(struct device *dev) | 631 | static int platform_legacy_resume(struct device *dev) |
656 | { | 632 | { |
657 | struct platform_driver *pdrv = to_platform_driver(dev->driver); | 633 | struct platform_driver *pdrv = to_platform_driver(dev->driver); |
@@ -714,8 +690,6 @@ static int platform_pm_suspend_noirq(struct device *dev) | |||
714 | if (drv->pm) { | 690 | if (drv->pm) { |
715 | if (drv->pm->suspend_noirq) | 691 | if (drv->pm->suspend_noirq) |
716 | ret = drv->pm->suspend_noirq(dev); | 692 | ret = drv->pm->suspend_noirq(dev); |
717 | } else { | ||
718 | ret = platform_legacy_suspend_late(dev, PMSG_SUSPEND); | ||
719 | } | 693 | } |
720 | 694 | ||
721 | return ret; | 695 | return ret; |
@@ -750,8 +724,6 @@ static int platform_pm_resume_noirq(struct device *dev) | |||
750 | if (drv->pm) { | 724 | if (drv->pm) { |
751 | if (drv->pm->resume_noirq) | 725 | if (drv->pm->resume_noirq) |
752 | ret = drv->pm->resume_noirq(dev); | 726 | ret = drv->pm->resume_noirq(dev); |
753 | } else { | ||
754 | ret = platform_legacy_resume_early(dev); | ||
755 | } | 727 | } |
756 | 728 | ||
757 | return ret; | 729 | return ret; |
@@ -797,8 +769,6 @@ static int platform_pm_freeze_noirq(struct device *dev) | |||
797 | if (drv->pm) { | 769 | if (drv->pm) { |
798 | if (drv->pm->freeze_noirq) | 770 | if (drv->pm->freeze_noirq) |
799 | ret = drv->pm->freeze_noirq(dev); | 771 | ret = drv->pm->freeze_noirq(dev); |
800 | } else { | ||
801 | ret = platform_legacy_suspend_late(dev, PMSG_FREEZE); | ||
802 | } | 772 | } |
803 | 773 | ||
804 | return ret; | 774 | return ret; |
@@ -833,8 +803,6 @@ static int platform_pm_thaw_noirq(struct device *dev) | |||
833 | if (drv->pm) { | 803 | if (drv->pm) { |
834 | if (drv->pm->thaw_noirq) | 804 | if (drv->pm->thaw_noirq) |
835 | ret = drv->pm->thaw_noirq(dev); | 805 | ret = drv->pm->thaw_noirq(dev); |
836 | } else { | ||
837 | ret = platform_legacy_resume_early(dev); | ||
838 | } | 806 | } |
839 | 807 | ||
840 | return ret; | 808 | return ret; |
@@ -869,8 +837,6 @@ static int platform_pm_poweroff_noirq(struct device *dev) | |||
869 | if (drv->pm) { | 837 | if (drv->pm) { |
870 | if (drv->pm->poweroff_noirq) | 838 | if (drv->pm->poweroff_noirq) |
871 | ret = drv->pm->poweroff_noirq(dev); | 839 | ret = drv->pm->poweroff_noirq(dev); |
872 | } else { | ||
873 | ret = platform_legacy_suspend_late(dev, PMSG_HIBERNATE); | ||
874 | } | 840 | } |
875 | 841 | ||
876 | return ret; | 842 | return ret; |
@@ -905,8 +871,6 @@ static int platform_pm_restore_noirq(struct device *dev) | |||
905 | if (drv->pm) { | 871 | if (drv->pm) { |
906 | if (drv->pm->restore_noirq) | 872 | if (drv->pm->restore_noirq) |
907 | ret = drv->pm->restore_noirq(dev); | 873 | ret = drv->pm->restore_noirq(dev); |
908 | } else { | ||
909 | ret = platform_legacy_resume_early(dev); | ||
910 | } | 874 | } |
911 | 875 | ||
912 | return ret; | 876 | return ret; |