diff options
Diffstat (limited to 'arch/frv/kernel/pm.c')
-rw-r--r-- | arch/frv/kernel/pm.c | 53 |
1 files changed, 44 insertions, 9 deletions
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index ee677ced7b68..c57ce3f1f2e2 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c | |||
@@ -125,7 +125,6 @@ unsigned long sleep_phys_sp(void *sp) | |||
125 | * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6 | 125 | * Use a temporary sysctl number. Horrid, but will be cleaned up in 2.6 |
126 | * when all the PM interfaces exist nicely. | 126 | * when all the PM interfaces exist nicely. |
127 | */ | 127 | */ |
128 | #define CTL_PM 9899 | ||
129 | #define CTL_PM_SUSPEND 1 | 128 | #define CTL_PM_SUSPEND 1 |
130 | #define CTL_PM_CMODE 2 | 129 | #define CTL_PM_CMODE 2 |
131 | #define CTL_PM_P0 4 | 130 | #define CTL_PM_P0 4 |
@@ -402,17 +401,53 @@ static int cm_sysctl(ctl_table *table, int __user *name, int nlen, | |||
402 | 401 | ||
403 | static struct ctl_table pm_table[] = | 402 | static struct ctl_table pm_table[] = |
404 | { | 403 | { |
405 | {CTL_PM_SUSPEND, "suspend", NULL, 0, 0200, NULL, &sysctl_pm_do_suspend}, | 404 | { |
406 | {CTL_PM_CMODE, "cmode", &clock_cmode_current, sizeof(int), 0644, NULL, &cmode_procctl, &cmode_sysctl, NULL}, | 405 | .ctl_name = CTL_PM_SUSPEND, |
407 | {CTL_PM_P0, "p0", &clock_p0_current, sizeof(int), 0644, NULL, &p0_procctl, &p0_sysctl, NULL}, | 406 | .procname = "suspend", |
408 | {CTL_PM_CM, "cm", &clock_cm_current, sizeof(int), 0644, NULL, &cm_procctl, &cm_sysctl, NULL}, | 407 | .data = NULL, |
409 | {0} | 408 | .maxlen = 0, |
409 | .mode = 0200, | ||
410 | .proc_handler = &sysctl_pm_do_suspend, | ||
411 | }, | ||
412 | { | ||
413 | .ctl_name = CTL_PM_CMODE, | ||
414 | .procname = "cmode", | ||
415 | .data = &clock_cmode_current, | ||
416 | .maxlen = sizeof(int), | ||
417 | .mode = 0644, | ||
418 | .proc_handler = &cmode_procctl, | ||
419 | .strategy = &cmode_sysctl, | ||
420 | }, | ||
421 | { | ||
422 | .ctl_name = CTL_PM_P0, | ||
423 | .procname = "p0", | ||
424 | .data = &clock_p0_current, | ||
425 | .maxlen = sizeof(int), | ||
426 | .mode = 0644, | ||
427 | .proc_handler = &p0_procctl, | ||
428 | .strategy = &p0_sysctl, | ||
429 | }, | ||
430 | { | ||
431 | .ctl_name = CTL_PM_CM, | ||
432 | .procname = "cm", | ||
433 | .data = &clock_cm_current, | ||
434 | .maxlen = sizeof(int), | ||
435 | .mode = 0644, | ||
436 | .proc_handler = &cm_procctl, | ||
437 | .strategy = &cm_sysctl, | ||
438 | }, | ||
439 | { .ctl_name = 0} | ||
410 | }; | 440 | }; |
411 | 441 | ||
412 | static struct ctl_table pm_dir_table[] = | 442 | static struct ctl_table pm_dir_table[] = |
413 | { | 443 | { |
414 | {CTL_PM, "pm", NULL, 0, 0555, pm_table}, | 444 | { |
415 | {0} | 445 | .ctl_name = CTL_PM, |
446 | .procname = "pm", | ||
447 | .mode = 0555, | ||
448 | .child = pm_table, | ||
449 | }, | ||
450 | { .ctl_name = 0} | ||
416 | }; | 451 | }; |
417 | 452 | ||
418 | /* | 453 | /* |
@@ -420,7 +455,7 @@ static struct ctl_table pm_dir_table[] = | |||
420 | */ | 455 | */ |
421 | static int __init pm_init(void) | 456 | static int __init pm_init(void) |
422 | { | 457 | { |
423 | register_sysctl_table(pm_dir_table, 1); | 458 | register_sysctl_table(pm_dir_table); |
424 | return 0; | 459 | return 0; |
425 | } | 460 | } |
426 | 461 | ||