Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Magnus Damm and committed by
Rafael J. Wysocki
511647ff 48fea965

-38
-36
drivers/base/platform.c
··· 628 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 631 static int platform_legacy_resume(struct device *dev) 656 632 { 657 633 struct platform_driver *pdrv = to_platform_driver(dev->driver); ··· 690 714 if (drv->pm) { 691 715 if (drv->pm->suspend_noirq) 692 716 ret = drv->pm->suspend_noirq(dev); 693 - } else { 694 - ret = platform_legacy_suspend_late(dev, PMSG_SUSPEND); 695 717 } 696 718 697 719 return ret; ··· 724 750 if (drv->pm) { 725 751 if (drv->pm->resume_noirq) 726 752 ret = drv->pm->resume_noirq(dev); 727 - } else { 728 - ret = platform_legacy_resume_early(dev); 729 753 } 730 754 731 755 return ret; ··· 769 797 if (drv->pm) { 770 798 if (drv->pm->freeze_noirq) 771 799 ret = drv->pm->freeze_noirq(dev); 772 - } else { 773 - ret = platform_legacy_suspend_late(dev, PMSG_FREEZE); 774 800 } 775 801 776 802 return ret; ··· 803 833 if (drv->pm) { 804 834 if (drv->pm->thaw_noirq) 805 835 ret = drv->pm->thaw_noirq(dev); 806 - } else { 807 - ret = platform_legacy_resume_early(dev); 808 836 } 809 837 810 838 return ret; ··· 837 869 if (drv->pm) { 838 870 if (drv->pm->poweroff_noirq) 839 871 ret = drv->pm->poweroff_noirq(dev); 840 - } else { 841 - ret = platform_legacy_suspend_late(dev, PMSG_HIBERNATE); 842 872 } 843 873 844 874 return ret; ··· 871 905 if (drv->pm) { 872 906 if (drv->pm->restore_noirq) 873 907 ret = drv->pm->restore_noirq(dev); 874 - } else { 875 - ret = platform_legacy_resume_early(dev); 876 908 } 877 909 878 910 return ret;
-2
include/linux/platform_device.h
··· 60 60 int (*remove)(struct platform_device *); 61 61 void (*shutdown)(struct platform_device *); 62 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 63 int (*resume)(struct platform_device *); 66 64 struct device_driver driver; 67 65 struct platform_device_id *id_table;