Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170025
b: refs/heads/master
c: 67a7e4f
h: refs/heads/master
i:
  170023: 3a60e9c
v: v3
  • Loading branch information
Eric W. Biederman committed Nov 12, 2009
1 parent d9969e0 commit 1b236d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 108 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: 163931922220e4cb5effd5af1e105038c2f0ab7a
refs/heads/master: 67a7e4f8bdfdff4b47c4a64bbc1fdbb3dfbd16c6
106 changes: 2 additions & 104 deletions trunk/arch/frv/kernel/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,37 +211,6 @@ static int cmode_procctl(ctl_table *ctl, int write,
return try_set_cmode(new_cmode)?:*lenp;
}

static int cmode_sysctl(ctl_table *table,
void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen)
{
if (oldval && oldlenp) {
size_t oldlen;

if (get_user(oldlen, oldlenp))
return -EFAULT;

if (oldlen != sizeof(int))
return -EINVAL;

if (put_user(clock_cmode_current, (unsigned __user *)oldval) ||
put_user(sizeof(int), oldlenp))
return -EFAULT;
}
if (newval && newlen) {
int new_cmode;

if (newlen != sizeof(int))
return -EINVAL;

if (get_user(new_cmode, (int __user *)newval))
return -EFAULT;

return try_set_cmode(new_cmode)?:1;
}
return 1;
}

static int try_set_p0(int new_p0)
{
unsigned long flags, clkc;
Expand Down Expand Up @@ -314,37 +283,6 @@ static int p0_procctl(ctl_table *ctl, int write,
return try_set_p0(new_p0)?:*lenp;
}

static int p0_sysctl(ctl_table *table,
void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen)
{
if (oldval && oldlenp) {
size_t oldlen;

if (get_user(oldlen, oldlenp))
return -EFAULT;

if (oldlen != sizeof(int))
return -EINVAL;

if (put_user(clock_p0_current, (unsigned __user *)oldval) ||
put_user(sizeof(int), oldlenp))
return -EFAULT;
}
if (newval && newlen) {
int new_p0;

if (newlen != sizeof(int))
return -EINVAL;

if (get_user(new_p0, (int __user *)newval))
return -EFAULT;

return try_set_p0(new_p0)?:1;
}
return 1;
}

static int cm_procctl(ctl_table *ctl, int write,
void __user *buffer, size_t *lenp, loff_t *fpos)
{
Expand All @@ -358,87 +296,47 @@ static int cm_procctl(ctl_table *ctl, int write,
return try_set_cm(new_cm)?:*lenp;
}

static int cm_sysctl(ctl_table *table,
void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen)
{
if (oldval && oldlenp) {
size_t oldlen;

if (get_user(oldlen, oldlenp))
return -EFAULT;

if (oldlen != sizeof(int))
return -EINVAL;

if (put_user(clock_cm_current, (unsigned __user *)oldval) ||
put_user(sizeof(int), oldlenp))
return -EFAULT;
}
if (newval && newlen) {
int new_cm;

if (newlen != sizeof(int))
return -EINVAL;

if (get_user(new_cm, (int __user *)newval))
return -EFAULT;

return try_set_cm(new_cm)?:1;
}
return 1;
}


static struct ctl_table pm_table[] =
{
{
.ctl_name = CTL_UNNUMBERED,
.procname = "suspend",
.data = NULL,
.maxlen = 0,
.mode = 0200,
.proc_handler = &sysctl_pm_do_suspend,
},
{
.ctl_name = CTL_PM_CMODE,
.procname = "cmode",
.data = &clock_cmode_current,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &cmode_procctl,
.strategy = &cmode_sysctl,
},
{
.ctl_name = CTL_PM_P0,
.procname = "p0",
.data = &clock_p0_current,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &p0_procctl,
.strategy = &p0_sysctl,
},
{
.ctl_name = CTL_PM_CM,
.procname = "cm",
.data = &clock_cm_current,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &cm_procctl,
.strategy = &cm_sysctl,
},
{ .ctl_name = 0}
{ }
};

static struct ctl_table pm_dir_table[] =
{
{
.ctl_name = CTL_PM,
.procname = "pm",
.mode = 0555,
.child = pm_table,
},
{ .ctl_name = 0}
{ }
};

/*
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/frv/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp,
static struct ctl_table frv_table[] =
{
{
.ctl_name = CTL_UNNUMBERD,
.procname = "cache-mode",
.data = NULL,
.maxlen = 0,
Expand All @@ -185,7 +184,6 @@ static struct ctl_table frv_table[] =
},
#ifdef CONFIG_MMU
{
.ctl_name = CTL_UNNUMBERD,
.procname = "pin-cxnr",
.data = NULL,
.maxlen = 0,
Expand All @@ -203,7 +201,6 @@ static struct ctl_table frv_table[] =
static struct ctl_table frv_dir_table[] =
{
{
.ctl_name = CTL_UNNUMBERED,
.procname = "frv",
.mode = 0555,
.child = frv_table
Expand Down

0 comments on commit 1b236d6

Please sign in to comment.