Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251113
b: refs/heads/master
c: 8f25c01
h: refs/heads/master
i:
  251111: e58872a
v: v3
  • Loading branch information
Geert Uytterhoeven authored and Paul Mundt committed May 24, 2011
1 parent 73b1f8f commit 397279a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a707642a0653c457376068d9d4a77afe93c10c93
refs/heads/master: 8f25c01dec43ccfb0ec7d6216c1494772917a429
15 changes: 7 additions & 8 deletions trunk/drivers/video/amifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2224,24 +2224,23 @@ static int amifb_ioctl(struct fb_info *info,
* Allocate, Clear and Align a Block of Chip Memory
*/

static u_long unaligned_chipptr = 0;
static void *aligned_chipptr;

static inline u_long __init chipalloc(u_long size)
{
size += PAGE_SIZE-1;
if (!(unaligned_chipptr = (u_long)amiga_chip_alloc(size,
"amifb [RAM]"))) {
aligned_chipptr = amiga_chip_alloc(size, "amifb [RAM]");
if (!aligned_chipptr) {
pr_err("amifb: No Chip RAM for frame buffer");
return 0;
}
memset((void *)unaligned_chipptr, 0, size);
return PAGE_ALIGN(unaligned_chipptr);
memset(aligned_chipptr, 0, size);
return (u_long)aligned_chipptr;
}

static inline void chipfree(void)
{
if (unaligned_chipptr)
amiga_chip_free((void *)unaligned_chipptr);
if (aligned_chipptr)
amiga_chip_free(aligned_chipptr);
}


Expand Down

0 comments on commit 397279a

Please sign in to comment.