Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280404
b: refs/heads/master
c: 9b39e73
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Dec 21, 2011
1 parent 24cf873 commit d72ac2f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 145 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35cd133c6130c1eb52806808abee9d62e6854a27
refs/heads/master: 9b39e73d0c2b265a7f8748b0e9a9f09be84079a8
115 changes: 0 additions & 115 deletions trunk/drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,25 +700,6 @@ static int platform_legacy_resume(struct device *dev)
return ret;
}

int platform_pm_prepare(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;

if (drv && drv->pm && drv->pm->prepare)
ret = drv->pm->prepare(dev);

return ret;
}

void platform_pm_complete(struct device *dev)
{
struct device_driver *drv = dev->driver;

if (drv && drv->pm && drv->pm->complete)
drv->pm->complete(dev);
}

#endif /* CONFIG_PM_SLEEP */

#ifdef CONFIG_SUSPEND
Expand All @@ -741,22 +722,6 @@ int platform_pm_suspend(struct device *dev)
return ret;
}

int platform_pm_suspend_noirq(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;

if (!drv)
return 0;

if (drv->pm) {
if (drv->pm->suspend_noirq)
ret = drv->pm->suspend_noirq(dev);
}

return ret;
}

int platform_pm_resume(struct device *dev)
{
struct device_driver *drv = dev->driver;
Expand All @@ -775,22 +740,6 @@ int platform_pm_resume(struct device *dev)
return ret;
}

int platform_pm_resume_noirq(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;

if (!drv)
return 0;

if (drv->pm) {
if (drv->pm->resume_noirq)
ret = drv->pm->resume_noirq(dev);
}

return ret;
}

#endif /* CONFIG_SUSPEND */

#ifdef CONFIG_HIBERNATE_CALLBACKS
Expand All @@ -813,22 +762,6 @@ int platform_pm_freeze(struct device *dev)
return ret;
}

int platform_pm_freeze_noirq(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;

if (!drv)
return 0;

if (drv->pm) {
if (drv->pm->freeze_noirq)
ret = drv->pm->freeze_noirq(dev);
}

return ret;
}

int platform_pm_thaw(struct device *dev)
{
struct device_driver *drv = dev->driver;
Expand All @@ -847,22 +780,6 @@ int platform_pm_thaw(struct device *dev)
return ret;
}

int platform_pm_thaw_noirq(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;

if (!drv)
return 0;

if (drv->pm) {
if (drv->pm->thaw_noirq)
ret = drv->pm->thaw_noirq(dev);
}

return ret;
}

int platform_pm_poweroff(struct device *dev)
{
struct device_driver *drv = dev->driver;
Expand All @@ -881,22 +798,6 @@ int platform_pm_poweroff(struct device *dev)
return ret;
}

int platform_pm_poweroff_noirq(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;

if (!drv)
return 0;

if (drv->pm) {
if (drv->pm->poweroff_noirq)
ret = drv->pm->poweroff_noirq(dev);
}

return ret;
}

int platform_pm_restore(struct device *dev)
{
struct device_driver *drv = dev->driver;
Expand All @@ -915,22 +816,6 @@ int platform_pm_restore(struct device *dev)
return ret;
}

int platform_pm_restore_noirq(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;

if (!drv)
return 0;

if (drv->pm) {
if (drv->pm->restore_noirq)
ret = drv->pm->restore_noirq(dev);
}

return ret;
}

#endif /* CONFIG_HIBERNATE_CALLBACKS */

static const struct dev_pm_ops platform_dev_pm_ops = {
Expand Down
30 changes: 1 addition & 29 deletions trunk/include/linux/platform_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,62 +264,34 @@ static inline char *early_platform_driver_setup_func(void) \
}
#endif /* MODULE */

#ifdef CONFIG_PM_SLEEP
extern int platform_pm_prepare(struct device *dev);
extern void platform_pm_complete(struct device *dev);
#else
#define platform_pm_prepare NULL
#define platform_pm_complete NULL
#endif

#ifdef CONFIG_SUSPEND
extern int platform_pm_suspend(struct device *dev);
extern int platform_pm_suspend_noirq(struct device *dev);
extern int platform_pm_resume(struct device *dev);
extern int platform_pm_resume_noirq(struct device *dev);
#else
#define platform_pm_suspend NULL
#define platform_pm_resume NULL
#define platform_pm_suspend_noirq NULL
#define platform_pm_resume_noirq NULL
#endif

#ifdef CONFIG_HIBERNATE_CALLBACKS
extern int platform_pm_freeze(struct device *dev);
extern int platform_pm_freeze_noirq(struct device *dev);
extern int platform_pm_thaw(struct device *dev);
extern int platform_pm_thaw_noirq(struct device *dev);
extern int platform_pm_poweroff(struct device *dev);
extern int platform_pm_poweroff_noirq(struct device *dev);
extern int platform_pm_restore(struct device *dev);
extern int platform_pm_restore_noirq(struct device *dev);
#else
#define platform_pm_freeze NULL
#define platform_pm_thaw NULL
#define platform_pm_poweroff NULL
#define platform_pm_restore NULL
#define platform_pm_freeze_noirq NULL
#define platform_pm_thaw_noirq NULL
#define platform_pm_poweroff_noirq NULL
#define platform_pm_restore_noirq NULL
#endif

#ifdef CONFIG_PM_SLEEP
#define USE_PLATFORM_PM_SLEEP_OPS \
.prepare = platform_pm_prepare, \
.complete = platform_pm_complete, \
.suspend = platform_pm_suspend, \
.resume = platform_pm_resume, \
.freeze = platform_pm_freeze, \
.thaw = platform_pm_thaw, \
.poweroff = platform_pm_poweroff, \
.restore = platform_pm_restore, \
.suspend_noirq = platform_pm_suspend_noirq, \
.resume_noirq = platform_pm_resume_noirq, \
.freeze_noirq = platform_pm_freeze_noirq, \
.thaw_noirq = platform_pm_thaw_noirq, \
.poweroff_noirq = platform_pm_poweroff_noirq, \
.restore_noirq = platform_pm_restore_noirq,
.restore = platform_pm_restore,
#else
#define USE_PLATFORM_PM_SLEEP_OPS
#endif
Expand Down

0 comments on commit d72ac2f

Please sign in to comment.