zorro: Fix reading of proc/bus/zorro/* in small chunks
[pandora-kernel.git] / drivers / zorro / proc.c
index 4f4ea88..cafc504 100644 (file)
@@ -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;