diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-05-03 12:23:56 +0100 |
---|---|---|
committer | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-05-03 12:23:56 +0100 |
commit | eca02b0c1dc1da374216128157747d8ed994e5ef (patch) | |
tree | d1fcc442129d13b4431686467a9ecbb50e222cfc /drivers/video/cyber2000fb.c | |
parent | 1f9c381fa3e0b9b9042e310c69df87eaf9b46ea4 (diff) | |
download | linux-3.10-eca02b0c1dc1da374216128157747d8ed994e5ef.tar.gz linux-3.10-eca02b0c1dc1da374216128157747d8ed994e5ef.tar.bz2 linux-3.10-eca02b0c1dc1da374216128157747d8ed994e5ef.zip |
[PATCH] ARM: Cleanup kmalloc in cyber2000fb
We use one kmalloc to allocate two structures needlessly.
Combine these two structures into one.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'drivers/video/cyber2000fb.c')
-rw-r--r-- | drivers/video/cyber2000fb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c index 8b1b7c687a9..3894b2a501d 100644 --- a/drivers/video/cyber2000fb.c +++ b/drivers/video/cyber2000fb.c @@ -90,6 +90,8 @@ struct cfb_info { */ u_char ramdac_ctrl; u_char ramdac_powerdown; + + u32 pseudo_palette[16]; }; static char *default_font = "Acorn8x8"; @@ -1223,9 +1225,7 @@ cyberpro_alloc_fb_info(unsigned int id, char *name) { struct cfb_info *cfb; - cfb = kmalloc(sizeof(struct cfb_info) + - sizeof(u32) * 16, GFP_KERNEL); - + cfb = kmalloc(sizeof(struct cfb_info), GFP_KERNEL); if (!cfb) return NULL; @@ -1281,7 +1281,7 @@ cyberpro_alloc_fb_info(unsigned int id, char *name) cfb->fb.fbops = &cyber2000fb_ops; cfb->fb.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; - cfb->fb.pseudo_palette = (void *)(cfb + 1); + cfb->fb.pseudo_palette = cfb->pseudo_palette; fb_alloc_cmap(&cfb->fb.cmap, NR_PALETTE, 0); |