Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328667
b: refs/heads/master
c: feb70af
h: refs/heads/master
i:
  328665: d22a98d
  328663: 22cd4b9
v: v3
  • Loading branch information
Rafael J. Wysocki committed Sep 3, 2012
1 parent 8d7d2a4 commit 1d7e695
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 23 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: 3cb6f10a4d925ec21f414bc30a8aded2830963e5
refs/heads/master: feb70af0e3ac6817327be70b47731039ea135dbc
15 changes: 0 additions & 15 deletions trunk/drivers/base/power/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,3 @@ int dev_pm_put_subsys_data(struct device *dev)
return ret;
}
EXPORT_SYMBOL_GPL(dev_pm_put_subsys_data);

/**
* dev_pm_syscore_device - Set/unset the given device's power.syscore flag.
* @dev: Device whose flag is to be modified.
* @val: New value of the flag.
*/
void dev_pm_syscore_device(struct device *dev, bool val)
{
unsigned long flags;

spin_lock_irqsave(&dev->power.lock, flags);
dev->power.syscore = val;
spin_unlock_irqrestore(&dev->power.lock, flags);
}
EXPORT_SYMBOL_GPL(dev_pm_syscore_device);
2 changes: 1 addition & 1 deletion trunk/drivers/base/power/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
not_suspended = 0;
list_for_each_entry(pdd, &genpd->dev_list, list_node)
if (pdd->dev->driver && (!pm_runtime_suspended(pdd->dev)
|| pdd->dev->power.irq_safe || pdd->dev->power.syscore))
|| pdd->dev->power.irq_safe))
not_suspended++;

if (not_suspended > genpd->in_progress)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/base/power/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static int rpm_check_suspend_allowed(struct device *dev)

if (dev->power.runtime_error)
retval = -EINVAL;
else if (dev->power.disable_depth > 0 || dev->power.syscore)
else if (dev->power.disable_depth > 0)
retval = -EACCES;
else if (atomic_read(&dev->power.usage_count) > 0)
retval = -EAGAIN;
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,13 @@ static inline void pm_suspend_ignore_children(struct device *dev, bool enable)
dev->power.ignore_children = enable;
}

static inline void dev_pm_syscore_device(struct device *dev, bool val)
{
#ifdef CONFIG_PM_SLEEP
dev->power.syscore = val;
#endif
}

static inline void device_lock(struct device *dev)
{
mutex_lock(&dev->mutex);
Expand Down
6 changes: 1 addition & 5 deletions trunk/include/linux/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,8 @@ struct device;

#ifdef CONFIG_PM
extern const char power_group_name[]; /* = "power" */

extern void dev_pm_syscore_device(struct device *dev, bool val);
#else
#define power_group_name NULL

static inline void dev_pm_syscore_device(struct device *dev, bool val) {}
#endif

typedef struct pm_message {
Expand Down Expand Up @@ -515,13 +511,13 @@ struct dev_pm_info {
bool is_suspended:1; /* Ditto */
bool ignore_children:1;
bool early_init:1; /* Owned by the PM core */
bool syscore:1;
spinlock_t lock;
#ifdef CONFIG_PM_SLEEP
struct list_head entry;
struct completion completion;
struct wakeup_source *wakeup;
bool wakeup_path:1;
bool syscore:1;
#else
unsigned int should_wakeup:1;
#endif
Expand Down

0 comments on commit 1d7e695

Please sign in to comment.