aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/system.c')
-rw-r--r--drivers/acpi/system.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index d86dcb3c2366..2d425d845821 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -39,7 +39,6 @@ ACPI_MODULE_NAME("acpi_system")
39#define ACPI_SYSTEM_FILE_EVENT "event" 39#define ACPI_SYSTEM_FILE_EVENT "event"
40#define ACPI_SYSTEM_FILE_DSDT "dsdt" 40#define ACPI_SYSTEM_FILE_DSDT "dsdt"
41#define ACPI_SYSTEM_FILE_FADT "fadt" 41#define ACPI_SYSTEM_FILE_FADT "fadt"
42extern struct fadt_descriptor acpi_fadt;
43 42
44/* -------------------------------------------------------------------------- 43/* --------------------------------------------------------------------------
45 FS Interface (/proc) 44 FS Interface (/proc)
@@ -76,17 +75,16 @@ acpi_system_read_dsdt(struct file *file,
76 char __user * buffer, size_t count, loff_t * ppos) 75 char __user * buffer, size_t count, loff_t * ppos)
77{ 76{
78 acpi_status status = AE_OK; 77 acpi_status status = AE_OK;
79 struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; 78 struct acpi_table_header *dsdt = NULL;
80 ssize_t res; 79 ssize_t res;
81 80
82 81
83 status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt); 82 status = acpi_get_table(ACPI_SIG_DSDT, 1, &dsdt);
84 if (ACPI_FAILURE(status)) 83 if (ACPI_FAILURE(status))
85 return -ENODEV; 84 return -ENODEV;
86 85
87 res = simple_read_from_buffer(buffer, count, ppos, 86 res = simple_read_from_buffer(buffer, count, ppos,
88 dsdt.pointer, dsdt.length); 87 dsdt, dsdt->length);
89 kfree(dsdt.pointer);
90 88
91 return res; 89 return res;
92} 90}
@@ -103,17 +101,16 @@ acpi_system_read_fadt(struct file *file,
103 char __user * buffer, size_t count, loff_t * ppos) 101 char __user * buffer, size_t count, loff_t * ppos)
104{ 102{
105 acpi_status status = AE_OK; 103 acpi_status status = AE_OK;
106 struct acpi_buffer fadt = { ACPI_ALLOCATE_BUFFER, NULL }; 104 struct acpi_table_header *fadt = NULL;
107 ssize_t res; 105 ssize_t res;
108 106
109 107
110 status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &fadt); 108 status = acpi_get_table(ACPI_SIG_FADT, 1, &fadt);
111 if (ACPI_FAILURE(status)) 109 if (ACPI_FAILURE(status))
112 return -ENODEV; 110 return -ENODEV;
113 111
114 res = simple_read_from_buffer(buffer, count, ppos, 112 res = simple_read_from_buffer(buffer, count, ppos,
115 fadt.pointer, fadt.length); 113 fadt, fadt->length);
116 kfree(fadt.pointer);
117 114
118 return res; 115 return res;
119} 116}