Commit 511647ff authored by Magnus Damm's avatar Magnus Damm Committed by Rafael J. Wysocki

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: default avatarMagnus Damm <damm@igel.co.jp>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent 48fea965
...@@ -628,30 +628,6 @@ static int platform_legacy_suspend(struct device *dev, pm_message_t mesg) ...@@ -628,30 +628,6 @@ static int platform_legacy_suspend(struct device *dev, pm_message_t mesg)
return ret; return ret;
} }
static int platform_legacy_suspend_late(struct device *dev, pm_message_t mesg)
{
struct platform_driver *pdrv = to_platform_driver(dev->driver);
struct platform_device *pdev = to_platform_device(dev);
int ret = 0;
if (dev->driver && pdrv->suspend_late)
ret = pdrv->suspend_late(pdev, mesg);
return ret;
}
static int platform_legacy_resume_early(struct device *dev)
{
struct platform_driver *pdrv = to_platform_driver(dev->driver);
struct platform_device *pdev = to_platform_device(dev);
int ret = 0;
if (dev->driver && pdrv->resume_early)
ret = pdrv->resume_early(pdev);
return ret;
}
static int platform_legacy_resume(struct device *dev) static int platform_legacy_resume(struct device *dev)
{ {
struct platform_driver *pdrv = to_platform_driver(dev->driver); struct platform_driver *pdrv = to_platform_driver(dev->driver);
...@@ -714,8 +690,6 @@ static int platform_pm_suspend_noirq(struct device *dev) ...@@ -714,8 +690,6 @@ static int platform_pm_suspend_noirq(struct device *dev)
if (drv->pm) { if (drv->pm) {
if (drv->pm->suspend_noirq) if (drv->pm->suspend_noirq)
ret = drv->pm->suspend_noirq(dev); ret = drv->pm->suspend_noirq(dev);
} else {
ret = platform_legacy_suspend_late(dev, PMSG_SUSPEND);
} }
return ret; return ret;
...@@ -750,8 +724,6 @@ static int platform_pm_resume_noirq(struct device *dev) ...@@ -750,8 +724,6 @@ static int platform_pm_resume_noirq(struct device *dev)
if (drv->pm) { if (drv->pm) {
if (drv->pm->resume_noirq) if (drv->pm->resume_noirq)
ret = drv->pm->resume_noirq(dev); ret = drv->pm->resume_noirq(dev);
} else {
ret = platform_legacy_resume_early(dev);
} }
return ret; return ret;
...@@ -797,8 +769,6 @@ static int platform_pm_freeze_noirq(struct device *dev) ...@@ -797,8 +769,6 @@ static int platform_pm_freeze_noirq(struct device *dev)
if (drv->pm) { if (drv->pm) {
if (drv->pm->freeze_noirq) if (drv->pm->freeze_noirq)
ret = drv->pm->freeze_noirq(dev); ret = drv->pm->freeze_noirq(dev);
} else {
ret = platform_legacy_suspend_late(dev, PMSG_FREEZE);
} }
return ret; return ret;
...@@ -833,8 +803,6 @@ static int platform_pm_thaw_noirq(struct device *dev) ...@@ -833,8 +803,6 @@ static int platform_pm_thaw_noirq(struct device *dev)
if (drv->pm) { if (drv->pm) {
if (drv->pm->thaw_noirq) if (drv->pm->thaw_noirq)
ret = drv->pm->thaw_noirq(dev); ret = drv->pm->thaw_noirq(dev);
} else {
ret = platform_legacy_resume_early(dev);
} }
return ret; return ret;
...@@ -869,8 +837,6 @@ static int platform_pm_poweroff_noirq(struct device *dev) ...@@ -869,8 +837,6 @@ static int platform_pm_poweroff_noirq(struct device *dev)
if (drv->pm) { if (drv->pm) {
if (drv->pm->poweroff_noirq) if (drv->pm->poweroff_noirq)
ret = drv->pm->poweroff_noirq(dev); ret = drv->pm->poweroff_noirq(dev);
} else {
ret = platform_legacy_suspend_late(dev, PMSG_HIBERNATE);
} }
return ret; return ret;
...@@ -905,8 +871,6 @@ static int platform_pm_restore_noirq(struct device *dev) ...@@ -905,8 +871,6 @@ static int platform_pm_restore_noirq(struct device *dev)
if (drv->pm) { if (drv->pm) {
if (drv->pm->restore_noirq) if (drv->pm->restore_noirq)
ret = drv->pm->restore_noirq(dev); ret = drv->pm->restore_noirq(dev);
} else {
ret = platform_legacy_resume_early(dev);
} }
return ret; return ret;
......
...@@ -60,8 +60,6 @@ struct platform_driver { ...@@ -60,8 +60,6 @@ struct platform_driver {
int (*remove)(struct platform_device *); int (*remove)(struct platform_device *);
void (*shutdown)(struct platform_device *); void (*shutdown)(struct platform_device *);
int (*suspend)(struct platform_device *, pm_message_t state); int (*suspend)(struct platform_device *, pm_message_t state);
int (*suspend_late)(struct platform_device *, pm_message_t state);
int (*resume_early)(struct platform_device *);
int (*resume)(struct platform_device *); int (*resume)(struct platform_device *);
struct device_driver driver; struct device_driver driver;
struct platform_device_id *id_table; struct platform_device_id *id_table;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment