X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fcris%2Farch-v32%2Fmm%2Fintmem.c;h=c807284014872955ee09f22c7dd72d816340046a;hb=057a056ced1ee7e000bad2a5c88241502747d350;hp=9ef56092a4c54f9cdd49255ae6683bf33adeb72a;hpb=45c680b9949ecdb829a331100ae49926bf82899c;p=cascardo%2Flinux.git diff --git a/arch/cris/arch-v32/mm/intmem.c b/arch/cris/arch-v32/mm/intmem.c index 9ef56092a4c5..c80728401487 100644 --- a/arch/cris/arch-v32/mm/intmem.c +++ b/arch/cris/arch-v32/mm/intmem.c @@ -113,14 +113,14 @@ void crisv32_intmem_free(void* addr) allocation->status = STATUS_FREE; /* Join with prev and/or next if also free */ - if ((prev != &intmem_allocations) && + if ((&prev->entry != &intmem_allocations) && (prev->status == STATUS_FREE)) { prev->size += allocation->size; list_del(&allocation->entry); kfree(allocation); allocation = prev; } - if ((next != &intmem_allocations) && + if ((&next->entry != &intmem_allocations) && (next->status == STATUS_FREE)) { allocation->size += next->size; list_del(&next->entry); @@ -145,5 +145,12 @@ unsigned long crisv32_intmem_virt_to_phys(void* addr) (unsigned long)intmem_virtual + MEM_INTMEM_START + RESERVED_SIZE); } -device_initcall(crisv32_intmem_init); + +static int __init crisv32_intmem_setup(void) +{ + crisv32_intmem_init(); + + return 0; +} +device_initcall(crisv32_intmem_setup);