dect
/
linux-2.6
Archived
13
0
Fork 0

[S390] channel measurement fix.

Specify correct sizeof() in chp_measurement_read() and return
correct amount of read data.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Cornelia Huck 2006-06-29 14:56:45 +02:00 committed by Martin Schwidefsky
parent da039bd1e8
commit 231caa1cac
1 changed files with 2 additions and 1 deletions

View File

@ -918,12 +918,13 @@ chp_measurement_read(struct kobject *kobj, char *buf, loff_t off, size_t count)
chp = to_channelpath(container_of(kobj, struct device, kobj));
css = to_css(chp->dev.parent);
size = sizeof(struct cmg_chars);
size = sizeof(struct cmg_entry);
/* Only allow single reads. */
if (off || count < size)
return 0;
chp_measurement_copy_block((struct cmg_entry *)buf, css, chp->id);
count = size;
return count;
}