1
0

crisv32.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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 @@
  5. allocation->status = STATUS_FREE;
  6. /* Join with prev and/or next if also free */
  7. - if ((prev != &intmem_allocations) &&
  8. + if ((&prev->entry != &intmem_allocations) &&
  9. (prev->status == STATUS_FREE)) {
  10. prev->size += allocation->size;
  11. list_del(&allocation->entry);
  12. kfree(allocation);
  13. allocation = prev;
  14. }
  15. - if ((next != &intmem_allocations) &&
  16. + if ((&next->entry != &intmem_allocations) &&
  17. (next->status == STATUS_FREE)) {
  18. allocation->size += next->size;
  19. list_del(&next->entry);
  20. @@ -145,5 +145,11 @@
  21. (unsigned long)intmem_virtual + MEM_INTMEM_START +
  22. RESERVED_SIZE);
  23. }
  24. -device_initcall(crisv32_intmem_init);
  25. +static int __init crisv32_intmem_setup(void)
  26. +{
  27. + crisv32_intmem_init();
  28. +
  29. + return 0;
  30. +}
  31. +device_initcall(crisv32_intmem_setup);