Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46453
b: refs/heads/master
c: 5bb730f
h: refs/heads/master
i:
  46451: 838d237
v: v3
  • Loading branch information
Zhang Rui authored and Len Brown committed Jan 29, 2007
1 parent 731b47f commit 3b499d1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 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: 219c3c8e268b9307eae9fae4c765a0c589b98338
refs/heads/master: 5bb730fda8aa4e3f7e94b259c468ecd095f60770
4 changes: 3 additions & 1 deletion trunk/drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ config ACPI_PROCFS
and this proc interface will be removed some time later,
it's marked as deprecated.
( /proc/acpi/debug_layer && debug_level are deprecated by
/sys/module/acpi/parameters/debug_layer && debug_level. )
/sys/module/acpi/parameters/debug_layer && debug_level.
/proc/acpi/info is deprecated by
/sys/module/acpi/parameters/acpica_version )

config ACPI_AC
tristate "AC Adapter"
Expand Down
24 changes: 24 additions & 0 deletions trunk/drivers/acpi/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@

#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME("acpi_system")
#ifdef MODULE_PARAM_PREFIX
#undef MODULE_PARAM_PREFIX
#endif
#define MODULE_PARAM_PREFIX "acpi."

#define ACPI_SYSTEM_CLASS "system"
#define ACPI_SYSTEM_DRIVER_NAME "ACPI System Driver"
#define ACPI_SYSTEM_DEVICE_NAME "System"
Expand All @@ -41,9 +46,23 @@ ACPI_MODULE_NAME("acpi_system")
#define ACPI_SYSTEM_FILE_FADT "fadt"
extern struct fadt_descriptor acpi_fadt;

/*
* Make ACPICA version work as module param
*/
static int param_get_acpica_version(char *buffer, struct kernel_param *kp) {
int result;

result = sprintf(buffer, "%x", ACPI_CA_VERSION);

return result;
}

module_param_call(acpica_version, NULL, param_get_acpica_version, NULL, 0444);

/* --------------------------------------------------------------------------
FS Interface (/proc)
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_PROCFS

static int acpi_system_read_info(struct seq_file *seq, void *offset)
{
Expand All @@ -63,6 +82,7 @@ static const struct file_operations acpi_system_info_ops = {
.llseek = seq_lseek,
.release = single_release,
};
#endif

static ssize_t acpi_system_read_dsdt(struct file *, char __user *, size_t,
loff_t *);
Expand Down Expand Up @@ -128,6 +148,7 @@ static int __init acpi_system_init(void)
if (acpi_disabled)
return 0;

#ifdef CONFIG_ACPI_PROCFS
/* 'info' [R] */
name = ACPI_SYSTEM_FILE_INFO;
entry = create_proc_entry(name, S_IRUGO, acpi_root_dir);
Expand All @@ -136,6 +157,7 @@ static int __init acpi_system_init(void)
else {
entry->proc_fops = &acpi_system_info_ops;
}
#endif

/* 'dsdt' [R] */
name = ACPI_SYSTEM_FILE_DSDT;
Expand All @@ -159,7 +181,9 @@ static int __init acpi_system_init(void)
Error:
remove_proc_entry(ACPI_SYSTEM_FILE_FADT, acpi_root_dir);
remove_proc_entry(ACPI_SYSTEM_FILE_DSDT, acpi_root_dir);
#ifdef CONFIG_ACPI_PROCFS
remove_proc_entry(ACPI_SYSTEM_FILE_INFO, acpi_root_dir);
#endif

error = -EFAULT;
goto Done;
Expand Down

0 comments on commit 3b499d1

Please sign in to comment.