浏览代码

zorro: Fix reading of proc/bus/zorro/* in small chunks

proc_bus_zorro_read() didn't take into account the current file position,
hence it always read from the start of the ConfigDev.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Geert Uytterhoeven 15 年之前
父节点
当前提交
2190a1e770
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/zorro/proc.c

+ 1 - 1
drivers/zorro/proc.c

@@ -68,7 +68,7 @@ proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *
 	cd.cd_BoardAddr = (void *)zorro_resource_start(z);
 	cd.cd_BoardSize = zorro_resource_len(z);
 
-	if (copy_to_user(buf, &cd, nbytes))
+	if (copy_to_user(buf, (void *)&cd + pos, nbytes))
 		return -EFAULT;
 	*ppos += nbytes;