diff options
author | Jiri Kosina <jkosina@suse.cz> | 2008-05-06 10:57:55 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2008-05-06 10:57:55 -0400 |
commit | 7022b15e2a9f878fd5184586064c63352c3dd225 (patch) | |
tree | 5365c2f5bc82ae1946636ee8d5cd5d3b7e804f1b /drivers/acpi/sbs.c | |
parent | aaad2b0c757f3e6e02552cb0bdcd91a5ec0d6305 (diff) | |
parent | a15306365a16380f3bafee9e181ba01231d4acd7 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/acpi/sbs.c')
-rw-r--r-- | drivers/acpi/sbs.c | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 585ae3c9c8ea..10a36512647c 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -483,8 +483,6 @@ acpi_sbs_add_fs(struct proc_dir_entry **dir, | |||
483 | struct file_operations *state_fops, | 483 | struct file_operations *state_fops, |
484 | struct file_operations *alarm_fops, void *data) | 484 | struct file_operations *alarm_fops, void *data) |
485 | { | 485 | { |
486 | struct proc_dir_entry *entry = NULL; | ||
487 | |||
488 | if (!*dir) { | 486 | if (!*dir) { |
489 | *dir = proc_mkdir(dir_name, parent_dir); | 487 | *dir = proc_mkdir(dir_name, parent_dir); |
490 | if (!*dir) { | 488 | if (!*dir) { |
@@ -494,34 +492,19 @@ acpi_sbs_add_fs(struct proc_dir_entry **dir, | |||
494 | } | 492 | } |
495 | 493 | ||
496 | /* 'info' [R] */ | 494 | /* 'info' [R] */ |
497 | if (info_fops) { | 495 | if (info_fops) |
498 | entry = create_proc_entry(ACPI_SBS_FILE_INFO, S_IRUGO, *dir); | 496 | proc_create_data(ACPI_SBS_FILE_INFO, S_IRUGO, *dir, |
499 | if (entry) { | 497 | info_fops, data); |
500 | entry->proc_fops = info_fops; | ||
501 | entry->data = data; | ||
502 | entry->owner = THIS_MODULE; | ||
503 | } | ||
504 | } | ||
505 | 498 | ||
506 | /* 'state' [R] */ | 499 | /* 'state' [R] */ |
507 | if (state_fops) { | 500 | if (state_fops) |
508 | entry = create_proc_entry(ACPI_SBS_FILE_STATE, S_IRUGO, *dir); | 501 | proc_create_data(ACPI_SBS_FILE_STATE, S_IRUGO, *dir, |
509 | if (entry) { | 502 | state_fops, data); |
510 | entry->proc_fops = state_fops; | ||
511 | entry->data = data; | ||
512 | entry->owner = THIS_MODULE; | ||
513 | } | ||
514 | } | ||
515 | 503 | ||
516 | /* 'alarm' [R/W] */ | 504 | /* 'alarm' [R/W] */ |
517 | if (alarm_fops) { | 505 | if (alarm_fops) |
518 | entry = create_proc_entry(ACPI_SBS_FILE_ALARM, S_IRUGO, *dir); | 506 | proc_create_data(ACPI_SBS_FILE_ALARM, S_IRUGO, *dir, |
519 | if (entry) { | 507 | alarm_fops, data); |
520 | entry->proc_fops = alarm_fops; | ||
521 | entry->data = data; | ||
522 | entry->owner = THIS_MODULE; | ||
523 | } | ||
524 | } | ||
525 | return 0; | 508 | return 0; |
526 | } | 509 | } |
527 | 510 | ||