Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98003
b: refs/heads/master
c: 46a21e4
h: refs/heads/master
i:
  98001: 4787939
  97999: f753fde
v: v3
  • Loading branch information
Akinobu Mita authored and Len Brown committed Jun 11, 2008
1 parent 2ddf25d commit edf1091
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 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: 7efd52a407bed6a2b02015b8ebbff7beba155392
refs/heads/master: 46a21e465e506bcd4dba759a39e7ef79978a705d
15 changes: 2 additions & 13 deletions trunk/drivers/acpi/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,15 @@ static ssize_t acpi_table_show(struct kobject *kobj,
container_of(bin_attr, struct acpi_table_attr, attr);
struct acpi_table_header *table_header = NULL;
acpi_status status;
ssize_t ret_count = count;

status =
acpi_get_table(table_attr->name, table_attr->instance,
&table_header);
if (ACPI_FAILURE(status))
return -ENODEV;

if (offset >= table_header->length) {
ret_count = 0;
goto end;
}

if (offset + ret_count > table_header->length)
ret_count = table_header->length - offset;

memcpy(buf, ((char *)table_header) + offset, ret_count);

end:
return ret_count;
return memory_read_from_buffer(buf, count, &offset,
table_header, table_header->length);
}

static void acpi_table_attr_init(struct acpi_table_attr *table_attr,
Expand Down

0 comments on commit edf1091

Please sign in to comment.