linux: update to 4.4.59
[openadk.git] / target / linux / patches / 4.4.59 / crisv32.patch
blobcb9b0d0283f33a5b8ba49afed0f659f3b6d48a14
1 diff -Nur linux-4.4.13.orig/arch/cris/arch-v32/mm/intmem.c linux-4.4.13/arch/cris/arch-v32/mm/intmem.c
2 --- linux-4.4.13.orig/arch/cris/arch-v32/mm/intmem.c 2016-06-08 03:14:51.000000000 +0200
3 +++ linux-4.4.13/arch/cris/arch-v32/mm/intmem.c 2016-06-21 20:40:18.919361891 +0200
4 @@ -113,14 +113,14 @@
6 allocation->status = STATUS_FREE;
7 /* Join with prev and/or next if also free */
8 - if ((prev != &intmem_allocations) &&
9 + if ((&prev->entry != &intmem_allocations) &&
10 (prev->status == STATUS_FREE)) {
11 prev->size += allocation->size;
12 list_del(&allocation->entry);
13 kfree(allocation);
14 allocation = prev;
16 - if ((next != &intmem_allocations) &&
17 + if ((&next->entry != &intmem_allocations) &&
18 (next->status == STATUS_FREE)) {
19 allocation->size += next->size;
20 list_del(&next->entry);
21 @@ -145,5 +145,11 @@
22 (unsigned long)intmem_virtual + MEM_INTMEM_START +
23 RESERVED_SIZE);
25 -device_initcall(crisv32_intmem_init);
27 +static int __init crisv32_intmem_setup(void)
29 + crisv32_intmem_init();
31 + return 0;
33 +device_initcall(crisv32_intmem_setup);