summaryrefslogtreecommitdiff
path: root/package/compcache/patches/100-use_register_width.patch
blob: 6200d56fdb9cb06fc354a5c90a34ec5514bd6473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff -uNr compcache-0.5.2/compcache.c compcache/compcache.c
--- compcache-0.5.2/compcache.c	2009-03-10 13:03:56.000000000 +0100
+++ compcache/ramzswap.c	2009-04-01 17:38:20.000000000 +0200
@@ -68,15 +68,15 @@
 static int page_zero_filled(void *ptr)
 {
 	u32 pos;
-	u64 *page;
-
-	page = (u64 *)ptr;
-
+#if defined(CONFIG_64BIT)
+	u64 *page = (u64 *)ptr;
+#else
+	u32 *page = (u32 *)ptr;
+#endif
 	for (pos = 0; pos != PAGE_SIZE / sizeof(*page); pos++) {
 		if (page[pos])
 			return 0;
 	}
-
 	return 1;
 }