diff options
-rw-r--r-- | drivers/base/platform.c | 36 | ||||
-rw-r--r-- | include/linux/platform_device.h | 2 |
2 files changed, 0 insertions, 38 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; |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 672a69849735..3c6675c2444b 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -60,8 +60,6 @@ struct platform_driver { | |||
60 | int (*remove)(struct platform_device *); | 60 | int (*remove)(struct platform_device *); |
61 | void (*shutdown)(struct platform_device *); | 61 | void (*shutdown)(struct platform_device *); |
62 | int (*suspend)(struct platform_device *, pm_message_t state); | 62 | int (*suspend)(struct platform_device *, pm_message_t state); |
63 | int (*suspend_late)(struct platform_device *, pm_message_t state); | ||
64 | int (*resume_early)(struct platform_device *); | ||
65 | int (*resume)(struct platform_device *); | 63 | int (*resume)(struct platform_device *); |
66 | struct device_driver driver; | 64 | struct device_driver driver; |
67 | struct platform_device_id *id_table; | 65 | struct platform_device_id *id_table; |