summaryrefslogtreecommitdiffstats
path: root/drivers/video/au1100fb.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-02-12 00:55:12 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 09:48:43 -0800
commitf5610b9c3a2896fcaa623b92d0f24d83f10bb2c0 (patch)
treef4ff35f5991debf0f892794687abc574cdaacb4f /drivers/video/au1100fb.c
parentc4f28e54d61278203c2bb2aea0679e0a738235d2 (diff)
downloadop-kernel-dev-f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0.zip
op-kernel-dev-f5610b9c3a2896fcaa623b92d0f24d83f10bb2c0.tar.gz
[PATCH] Video: fb, kzalloc changes
Use kzalloc instead of kmalloc + memset(0). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/au1100fb.c')
-rw-r--r--drivers/video/au1100fb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c
index ef5c16f..80a81ec 100644
--- a/drivers/video/au1100fb.c
+++ b/drivers/video/au1100fb.c
@@ -468,11 +468,10 @@ int au1100fb_drv_probe(struct device *dev)
return -EINVAL;
/* Allocate new device private */
- if (!(fbdev = kmalloc(sizeof(struct au1100fb_device), GFP_KERNEL))) {
+ if (!(fbdev = kzalloc(sizeof(struct au1100fb_device), GFP_KERNEL))) {
print_err("fail to allocate device private record");
return -ENOMEM;
}
- memset((void*)fbdev, 0, sizeof(struct au1100fb_device));
fbdev->panel = &known_lcd_panels[drv_info.panel_idx];
@@ -549,10 +548,9 @@ int au1100fb_drv_probe(struct device *dev)
fbdev->info.fbops = &au1100fb_ops;
fbdev->info.fix = au1100fb_fix;
- if (!(fbdev->info.pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL))) {
+ if (!(fbdev->info.pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL))) {
return -ENOMEM;
}
- memset(fbdev->info.pseudo_palette, 0, sizeof(u32) * 16);
if (fb_alloc_cmap(&fbdev->info.cmap, AU1100_LCD_NBR_PALETTE_ENTRIES, 0) < 0) {
print_err("Fail to allocate colormap (%d entries)",
OpenPOWER on IntegriCloud