diff options
Diffstat (limited to 'drivers/acpi/sleep/proc.c')
-rw-r--r-- | drivers/acpi/sleep/proc.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index f8df5217d477..8a5fe8710513 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c | |||
@@ -440,6 +440,7 @@ acpi_system_wakeup_device_open_fs(struct inode *inode, struct file *file) | |||
440 | } | 440 | } |
441 | 441 | ||
442 | static const struct file_operations acpi_system_wakeup_device_fops = { | 442 | static const struct file_operations acpi_system_wakeup_device_fops = { |
443 | .owner = THIS_MODULE, | ||
443 | .open = acpi_system_wakeup_device_open_fs, | 444 | .open = acpi_system_wakeup_device_open_fs, |
444 | .read = seq_read, | 445 | .read = seq_read, |
445 | .write = acpi_system_write_wakeup_device, | 446 | .write = acpi_system_write_wakeup_device, |
@@ -449,6 +450,7 @@ static const struct file_operations acpi_system_wakeup_device_fops = { | |||
449 | 450 | ||
450 | #ifdef CONFIG_ACPI_PROCFS | 451 | #ifdef CONFIG_ACPI_PROCFS |
451 | static const struct file_operations acpi_system_sleep_fops = { | 452 | static const struct file_operations acpi_system_sleep_fops = { |
453 | .owner = THIS_MODULE, | ||
452 | .open = acpi_system_sleep_open_fs, | 454 | .open = acpi_system_sleep_open_fs, |
453 | .read = seq_read, | 455 | .read = seq_read, |
454 | .write = acpi_system_write_sleep, | 456 | .write = acpi_system_write_sleep, |
@@ -459,6 +461,7 @@ static const struct file_operations acpi_system_sleep_fops = { | |||
459 | 461 | ||
460 | #ifdef HAVE_ACPI_LEGACY_ALARM | 462 | #ifdef HAVE_ACPI_LEGACY_ALARM |
461 | static const struct file_operations acpi_system_alarm_fops = { | 463 | static const struct file_operations acpi_system_alarm_fops = { |
464 | .owner = THIS_MODULE, | ||
462 | .open = acpi_system_alarm_open_fs, | 465 | .open = acpi_system_alarm_open_fs, |
463 | .read = seq_read, | 466 | .read = seq_read, |
464 | .write = acpi_system_write_alarm, | 467 | .write = acpi_system_write_alarm, |
@@ -477,37 +480,26 @@ static u32 rtc_handler(void *context) | |||
477 | 480 | ||
478 | static int __init acpi_sleep_proc_init(void) | 481 | static int __init acpi_sleep_proc_init(void) |
479 | { | 482 | { |
480 | struct proc_dir_entry *entry = NULL; | ||
481 | |||
482 | if (acpi_disabled) | 483 | if (acpi_disabled) |
483 | return 0; | 484 | return 0; |
484 | 485 | ||
485 | #ifdef CONFIG_ACPI_PROCFS | 486 | #ifdef CONFIG_ACPI_PROCFS |
486 | /* 'sleep' [R/W] */ | 487 | /* 'sleep' [R/W] */ |
487 | entry = | 488 | proc_create("sleep", S_IFREG | S_IRUGO | S_IWUSR, |
488 | create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR, | 489 | acpi_root_dir, &acpi_system_sleep_fops); |
489 | acpi_root_dir); | ||
490 | if (entry) | ||
491 | entry->proc_fops = &acpi_system_sleep_fops; | ||
492 | #endif /* CONFIG_ACPI_PROCFS */ | 490 | #endif /* CONFIG_ACPI_PROCFS */ |
493 | 491 | ||
494 | #ifdef HAVE_ACPI_LEGACY_ALARM | 492 | #ifdef HAVE_ACPI_LEGACY_ALARM |
495 | /* 'alarm' [R/W] */ | 493 | /* 'alarm' [R/W] */ |
496 | entry = | 494 | proc_create("alarm", S_IFREG | S_IRUGO | S_IWUSR, |
497 | create_proc_entry("alarm", S_IFREG | S_IRUGO | S_IWUSR, | 495 | acpi_root_dir, &acpi_system_alarm_fops); |
498 | acpi_root_dir); | ||
499 | if (entry) | ||
500 | entry->proc_fops = &acpi_system_alarm_fops; | ||
501 | 496 | ||
502 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); | 497 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); |
503 | #endif /* HAVE_ACPI_LEGACY_ALARM */ | 498 | #endif /* HAVE_ACPI_LEGACY_ALARM */ |
504 | 499 | ||
505 | /* 'wakeup device' [R/W] */ | 500 | /* 'wakeup device' [R/W] */ |
506 | entry = | 501 | proc_create("wakeup", S_IFREG | S_IRUGO | S_IWUSR, |
507 | create_proc_entry("wakeup", S_IFREG | S_IRUGO | S_IWUSR, | 502 | acpi_root_dir, &acpi_system_wakeup_device_fops); |
508 | acpi_root_dir); | ||
509 | if (entry) | ||
510 | entry->proc_fops = &acpi_system_wakeup_device_fops; | ||
511 | 503 | ||
512 | return 0; | 504 | return 0; |
513 | } | 505 | } |