]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/addrconf.c
[PATCH] Use sg_set_buf/sg_init_one where applicable
[linux-2.6-omap-h63xx.git] / net / ipv6 / addrconf.c
index a970b4727ce8c9c2f8d61cf8a976113ced190ce5..41edc14851e882f86b84b720a28ae2395d8c432f 100644 (file)
@@ -75,7 +75,7 @@
 #ifdef CONFIG_IPV6_PRIVACY
 #include <linux/random.h>
 #include <linux/crypto.h>
-#include <asm/scatterlist.h>
+#include <linux/scatterlist.h>
 #endif
 
 #include <asm/uaccess.h>
@@ -1217,12 +1217,8 @@ static int __ipv6_regen_rndid(struct inet6_dev *idev)
        struct net_device *dev;
        struct scatterlist sg[2];
 
-       sg[0].page = virt_to_page(idev->entropy);
-       sg[0].offset = offset_in_page(idev->entropy);
-       sg[0].length = 8;
-       sg[1].page = virt_to_page(idev->work_eui64);
-       sg[1].offset = offset_in_page(idev->work_eui64);
-       sg[1].length = 8;
+       sg_set_buf(&sg[0], idev->entropy, 8);
+       sg_set_buf(&sg[1], idev->work_eui64, 8);
 
        dev = idev->dev;