diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-06 08:23:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-06 08:23:39 -0400 |
commit | 68083e05d72d94f347293d8cc0067050ba904bfa (patch) | |
tree | 842e71365bd90866be7add181661a4039d891564 /drivers/acpi/system.c | |
parent | 7baac8b91f9871ba8cb09af84de4ae1d86d07812 (diff) | |
parent | b7279469d66b55119784b8b9529c99c1955fe747 (diff) |
Merge commit 'v2.6.26-rc9' into cpus4096
Diffstat (limited to 'drivers/acpi/system.c')
-rw-r--r-- | drivers/acpi/system.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c index 769f24855eb6..5bd2dec9a7ac 100644 --- a/drivers/acpi/system.c +++ b/drivers/acpi/system.c | |||
@@ -77,7 +77,6 @@ static ssize_t acpi_table_show(struct kobject *kobj, | |||
77 | container_of(bin_attr, struct acpi_table_attr, attr); | 77 | container_of(bin_attr, struct acpi_table_attr, attr); |
78 | struct acpi_table_header *table_header = NULL; | 78 | struct acpi_table_header *table_header = NULL; |
79 | acpi_status status; | 79 | acpi_status status; |
80 | ssize_t ret_count = count; | ||
81 | 80 | ||
82 | status = | 81 | status = |
83 | acpi_get_table(table_attr->name, table_attr->instance, | 82 | acpi_get_table(table_attr->name, table_attr->instance, |
@@ -85,18 +84,8 @@ static ssize_t acpi_table_show(struct kobject *kobj, | |||
85 | if (ACPI_FAILURE(status)) | 84 | if (ACPI_FAILURE(status)) |
86 | return -ENODEV; | 85 | return -ENODEV; |
87 | 86 | ||
88 | if (offset >= table_header->length) { | 87 | return memory_read_from_buffer(buf, count, &offset, |
89 | ret_count = 0; | 88 | table_header, table_header->length); |
90 | goto end; | ||
91 | } | ||
92 | |||
93 | if (offset + ret_count > table_header->length) | ||
94 | ret_count = table_header->length - offset; | ||
95 | |||
96 | memcpy(buf, ((char *)table_header) + offset, ret_count); | ||
97 | |||
98 | end: | ||
99 | return ret_count; | ||
100 | } | 89 | } |
101 | 90 | ||
102 | static void acpi_table_attr_init(struct acpi_table_attr *table_attr, | 91 | static void acpi_table_attr_init(struct acpi_table_attr *table_attr, |