lkml.org 
[lkml]   [2009]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/5] fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset
Date
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
drivers/video/bf54x-lq043fb.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index 8aa67de..e49ae5e 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -630,7 +630,7 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev)

fbinfo->fbops = &bfin_bf54x_fb_ops;

- fbinfo->pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL);
+ fbinfo->pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL);
if (!fbinfo->pseudo_palette) {
printk(KERN_ERR DRIVER_NAME
"Fail to allocate pseudo_palette\n");
@@ -639,8 +639,6 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
goto out4;
}

- memset(fbinfo->pseudo_palette, 0, sizeof(u32) * 16);
-
if (fb_alloc_cmap(&fbinfo->cmap, BFIN_LCD_NBR_PALETTE_ENTRIES, 0)
< 0) {
printk(KERN_ERR DRIVER_NAME
--
1.6.3.1


\
 
 \ /
  Last update: 2009-06-13 03:01    [W:2.917 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site