Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291855
b: refs/heads/master
c: 93e1ee4
h: refs/heads/master
i:
  291853: 6c224ac
  291851: 8d290b6
  291847: 04e0145
  291839: 78f3b13
v: v3
  • Loading branch information
Rafael J. Wysocki committed Feb 17, 2012
1 parent 7f82390 commit bdd7a01
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 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: 55ae451918ec62e553f11b6118fec157f90c31c3
refs/heads/master: 93e1ee43a72b11e1b50aab87046c131a836a4456
8 changes: 3 additions & 5 deletions trunk/kernel/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,10 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,

#ifdef CONFIG_SUSPEND
for (s = &pm_states[state]; state < PM_SUSPEND_MAX; s++, state++) {
if (*s && len == strlen(*s) && !strncmp(buf, *s, len))
if (*s && len == strlen(*s) && !strncmp(buf, *s, len)) {
error = pm_suspend(state);
break;
}
if (state < PM_SUSPEND_MAX && *s) {
error = enter_state(state);
suspend_stats_update(error);
}
}
#endif

Expand Down
2 changes: 0 additions & 2 deletions trunk/kernel/power/power.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,11 @@ extern const char *const pm_states[];

extern bool valid_state(suspend_state_t state);
extern int suspend_devices_and_enter(suspend_state_t state);
extern int enter_state(suspend_state_t state);
#else /* !CONFIG_SUSPEND */
static inline int suspend_devices_and_enter(suspend_state_t state)
{
return -ENOSYS;
}
static inline int enter_state(suspend_state_t state) { return -ENOSYS; }
static inline bool valid_state(suspend_state_t state) { return false; }
#endif /* !CONFIG_SUSPEND */

Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/power/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static void suspend_finish(void)
* Fail if that's not the case. Otherwise, prepare for system suspend, make the
* system enter the given sleep state and clean up after wakeup.
*/
int enter_state(suspend_state_t state)
static int enter_state(suspend_state_t state)
{
int error;

Expand Down

0 comments on commit bdd7a01

Please sign in to comment.