Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330056
b: refs/heads/master
c: 87be893
h: refs/heads/master
v: v3
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed Oct 5, 2012
1 parent 3dfd0b1 commit 47903c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 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: 8f243af42adef5f589b8e39656284ca9c9374e44
refs/heads/master: 87be8932ae55da702411328c1438e29905ced40a
19 changes: 9 additions & 10 deletions trunk/arch/frv/kernel/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,23 +153,22 @@ static int user_atoi(char __user *ubuf, size_t len)
static int sysctl_pm_do_suspend(ctl_table *ctl, int write,
void __user *buffer, size_t *lenp, loff_t *fpos)
{
int retval, mode;
int mode;

if (*lenp <= 0)
return -EIO;

mode = user_atoi(buffer, *lenp);
if ((mode != 1) && (mode != 5))
return -EINVAL;
switch (mode) {
case 1:
return pm_do_suspend();

if (retval == 0) {
if (mode == 5)
retval = pm_do_bus_sleep();
else
retval = pm_do_suspend();
}
case 5:
return pm_do_bus_sleep();

return retval;
default:
return -EINVAL;
}
}

static int try_set_cmode(int new_cmode)
Expand Down

0 comments on commit 47903c0

Please sign in to comment.