diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-05-21 15:42:56 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-05-24 03:26:31 -0400 |
commit | 8f25c01dec43ccfb0ec7d6216c1494772917a429 (patch) | |
tree | 44bc112b08d9a7074618d2eb966c2984410e289a /drivers/video/amifb.c | |
parent | a707642a0653c457376068d9d4a77afe93c10c93 (diff) |
fbdev/amifb: Remove superfluous alignment of frame buffer memory
amiga_chip_alloc() already aligns to the PAGE_SIZE
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/amifb.c')
-rw-r--r-- | drivers/video/amifb.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c index 1b0185cf686..5ea6596dd82 100644 --- a/drivers/video/amifb.c +++ b/drivers/video/amifb.c | |||
@@ -2224,24 +2224,23 @@ static int amifb_ioctl(struct fb_info *info, | |||
2224 | * Allocate, Clear and Align a Block of Chip Memory | 2224 | * Allocate, Clear and Align a Block of Chip Memory |
2225 | */ | 2225 | */ |
2226 | 2226 | ||
2227 | static u_long unaligned_chipptr = 0; | 2227 | static void *aligned_chipptr; |
2228 | 2228 | ||
2229 | static inline u_long __init chipalloc(u_long size) | 2229 | static inline u_long __init chipalloc(u_long size) |
2230 | { | 2230 | { |
2231 | size += PAGE_SIZE-1; | 2231 | aligned_chipptr = amiga_chip_alloc(size, "amifb [RAM]"); |
2232 | if (!(unaligned_chipptr = (u_long)amiga_chip_alloc(size, | 2232 | if (!aligned_chipptr) { |
2233 | "amifb [RAM]"))) { | ||
2234 | pr_err("amifb: No Chip RAM for frame buffer"); | 2233 | pr_err("amifb: No Chip RAM for frame buffer"); |
2235 | return 0; | 2234 | return 0; |
2236 | } | 2235 | } |
2237 | memset((void *)unaligned_chipptr, 0, size); | 2236 | memset(aligned_chipptr, 0, size); |
2238 | return PAGE_ALIGN(unaligned_chipptr); | 2237 | return (u_long)aligned_chipptr; |
2239 | } | 2238 | } |
2240 | 2239 | ||
2241 | static inline void chipfree(void) | 2240 | static inline void chipfree(void) |
2242 | { | 2241 | { |
2243 | if (unaligned_chipptr) | 2242 | if (aligned_chipptr) |
2244 | amiga_chip_free((void *)unaligned_chipptr); | 2243 | amiga_chip_free(aligned_chipptr); |
2245 | } | 2244 | } |
2246 | 2245 | ||
2247 | 2246 | ||