Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105993
b: refs/heads/master
c: abe19b7
h: refs/heads/master
i:
  105991: 640f5bb
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Jul 25, 2008
1 parent 7e325e2 commit 1717edf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 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: f37e66173e0cc09b4e5a89eb0294abbefc15f435
refs/heads/master: abe19b7b822a8fdbe3dbfd6e066d0698b4eefb06
13 changes: 2 additions & 11 deletions trunk/drivers/firmware/dcdbas.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,11 @@ static ssize_t smi_data_read(struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf, loff_t pos, size_t count)
{
size_t max_read;
ssize_t ret;

mutex_lock(&smi_data_lock);

if (pos >= smi_data_buf_size) {
ret = 0;
goto out;
}

max_read = smi_data_buf_size - pos;
ret = min(max_read, count);
memcpy(buf, smi_data_buf + pos, ret);
out:
ret = memory_read_from_buffer(buf, count, &pos, smi_data_buf,
smi_data_buf_size);
mutex_unlock(&smi_data_lock);
return ret;
}
Expand Down

0 comments on commit 1717edf

Please sign in to comment.