Loading arch/m68k/amiga/chipram.c +61 −57 Original line number Diff line number Diff line Loading @@ -55,7 +55,8 @@ void *amiga_chip_alloc(unsigned long size, const char *name) return NULL; res->name = name; if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) { if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) { kfree(res); return NULL; } Loading @@ -70,9 +71,9 @@ EXPORT_SYMBOL(amiga_chip_alloc); /* * Warning: * amiga_chip_alloc_res is meant only for drivers that need to allocate * Chip RAM before kmalloc() is functional. As a consequence, those * drivers must not free that Chip RAM afterwards. * amiga_chip_alloc_res is meant only for drivers that need to * allocate Chip RAM before kmalloc() is functional. As a consequence, * those drivers must not free that Chip RAM afterwards. */ void * __init amiga_chip_alloc_res(unsigned long size, struct resource *res) Loading @@ -87,9 +88,11 @@ void * __init amiga_chip_alloc_res(unsigned long size, struct resource *res) #ifdef DEBUG printk("amiga_chip_alloc_res: allocate %ld bytes\n", size); #endif if (allocate_resource(&chipram_res, res, size, start, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) { if (allocate_resource(&chipram_res, res, size, start, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) { printk("amiga_chip_alloc_res: first alloc failed!\n"); if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) return NULL; } chipavail -= size; Loading Loading @@ -117,7 +120,8 @@ void amiga_chip_free(void *ptr) kfree(res); return; } printk("amiga_chip_free: trying to free nonexistent region at %p\n", ptr); printk("amiga_chip_free: trying to free nonexistent region at %p\n", ptr); } EXPORT_SYMBOL(amiga_chip_free); Loading Loading
arch/m68k/amiga/chipram.c +61 −57 Original line number Diff line number Diff line Loading @@ -55,7 +55,8 @@ void *amiga_chip_alloc(unsigned long size, const char *name) return NULL; res->name = name; if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) { if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) { kfree(res); return NULL; } Loading @@ -70,9 +71,9 @@ EXPORT_SYMBOL(amiga_chip_alloc); /* * Warning: * amiga_chip_alloc_res is meant only for drivers that need to allocate * Chip RAM before kmalloc() is functional. As a consequence, those * drivers must not free that Chip RAM afterwards. * amiga_chip_alloc_res is meant only for drivers that need to * allocate Chip RAM before kmalloc() is functional. As a consequence, * those drivers must not free that Chip RAM afterwards. */ void * __init amiga_chip_alloc_res(unsigned long size, struct resource *res) Loading @@ -87,9 +88,11 @@ void * __init amiga_chip_alloc_res(unsigned long size, struct resource *res) #ifdef DEBUG printk("amiga_chip_alloc_res: allocate %ld bytes\n", size); #endif if (allocate_resource(&chipram_res, res, size, start, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) { if (allocate_resource(&chipram_res, res, size, start, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) { printk("amiga_chip_alloc_res: first alloc failed!\n"); if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) return NULL; } chipavail -= size; Loading Loading @@ -117,7 +120,8 @@ void amiga_chip_free(void *ptr) kfree(res); return; } printk("amiga_chip_free: trying to free nonexistent region at %p\n", ptr); printk("amiga_chip_free: trying to free nonexistent region at %p\n", ptr); } EXPORT_SYMBOL(amiga_chip_free); Loading