]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/scatterlist.h
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-2.6-omap-h63xx.git] / include / linux / scatterlist.h
index 416e000dfe81c0febed74c4f8aef8bcd979565db..e3ff21dbac536f11d7f62be1dae027d37466b465 100644 (file)
@@ -191,8 +191,8 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
        /*
         * offset and length are unused for chain entry.  Clear them.
         */
-       prv->offset = 0;
-       prv->length = 0;
+       prv[prv_nents - 1].offset = 0;
+       prv[prv_nents - 1].length = 0;
 
        /*
         * Set lowest bit to indicate a link pointer, and make sure to clear