Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280405
b: refs/heads/master
c: 8114ab7
h: refs/heads/master
i:
  280403: 24cf873
v: v3
  • Loading branch information
Rafael J. Wysocki committed Dec 21, 2011
1 parent d72ac2f commit 930ed57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 136 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: 9b39e73d0c2b265a7f8748b0e9a9f09be84079a8
refs/heads/master: 8114ab763b2d297c8af49bf380a093d76e929692
136 changes: 1 addition & 135 deletions trunk/drivers/amba/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,31 +109,7 @@ static int amba_legacy_resume(struct device *dev)
return ret;
}

static int amba_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;
}

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

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

#else /* !CONFIG_PM_SLEEP */

#define amba_pm_prepare NULL
#define amba_pm_complete NULL

#endif /* !CONFIG_PM_SLEEP */
#endif /* CONFIG_PM_SLEEP */

#ifdef CONFIG_SUSPEND

Expand All @@ -155,22 +131,6 @@ static int amba_pm_suspend(struct device *dev)
return ret;
}

static int amba_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;
}

static int amba_pm_resume(struct device *dev)
{
struct device_driver *drv = dev->driver;
Expand All @@ -189,28 +149,10 @@ static int amba_pm_resume(struct device *dev)
return ret;
}

static int amba_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;
}

#else /* !CONFIG_SUSPEND */

#define amba_pm_suspend NULL
#define amba_pm_resume NULL
#define amba_pm_suspend_noirq NULL
#define amba_pm_resume_noirq NULL

#endif /* !CONFIG_SUSPEND */

Expand All @@ -234,22 +176,6 @@ static int amba_pm_freeze(struct device *dev)
return ret;
}

static int amba_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;
}

static int amba_pm_thaw(struct device *dev)
{
struct device_driver *drv = dev->driver;
Expand All @@ -268,22 +194,6 @@ static int amba_pm_thaw(struct device *dev)
return ret;
}

static int amba_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;
}

static int amba_pm_poweroff(struct device *dev)
{
struct device_driver *drv = dev->driver;
Expand All @@ -302,22 +212,6 @@ static int amba_pm_poweroff(struct device *dev)
return ret;
}

static int amba_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;
}

static int amba_pm_restore(struct device *dev)
{
struct device_driver *drv = dev->driver;
Expand All @@ -336,32 +230,12 @@ static int amba_pm_restore(struct device *dev)
return ret;
}

static int amba_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;
}

#else /* !CONFIG_HIBERNATE_CALLBACKS */

#define amba_pm_freeze NULL
#define amba_pm_thaw NULL
#define amba_pm_poweroff NULL
#define amba_pm_restore NULL
#define amba_pm_freeze_noirq NULL
#define amba_pm_thaw_noirq NULL
#define amba_pm_poweroff_noirq NULL
#define amba_pm_restore_noirq NULL

#endif /* !CONFIG_HIBERNATE_CALLBACKS */

Expand Down Expand Up @@ -402,20 +276,12 @@ static int amba_pm_runtime_resume(struct device *dev)
#ifdef CONFIG_PM

static const struct dev_pm_ops amba_pm = {
.prepare = amba_pm_prepare,
.complete = amba_pm_complete,
.suspend = amba_pm_suspend,
.resume = amba_pm_resume,
.freeze = amba_pm_freeze,
.thaw = amba_pm_thaw,
.poweroff = amba_pm_poweroff,
.restore = amba_pm_restore,
.suspend_noirq = amba_pm_suspend_noirq,
.resume_noirq = amba_pm_resume_noirq,
.freeze_noirq = amba_pm_freeze_noirq,
.thaw_noirq = amba_pm_thaw_noirq,
.poweroff_noirq = amba_pm_poweroff_noirq,
.restore_noirq = amba_pm_restore_noirq,
SET_RUNTIME_PM_OPS(
amba_pm_runtime_suspend,
amba_pm_runtime_resume,
Expand Down

0 comments on commit 930ed57

Please sign in to comment.