Commit 1b86d775 authored by Joe Perches's avatar Joe Perches Committed by Paul Mundt

video: Convert vmalloc/memset to vzalloc

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent bb8b2662
...@@ -515,11 +515,10 @@ static int __devinit arcfb_probe(struct platform_device *dev) ...@@ -515,11 +515,10 @@ static int __devinit arcfb_probe(struct platform_device *dev)
/* We need a flat backing store for the Arc's /* We need a flat backing store for the Arc's
less-flat actual paged framebuffer */ less-flat actual paged framebuffer */
if (!(videomemory = vmalloc(videomemorysize))) videomemory = vzalloc(videomemorysize);
if (!videomemory)
return retval; return retval;
memset(videomemory, 0, videomemorysize);
info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev); info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev);
if (!info) if (!info)
goto err; goto err;
......
...@@ -1101,12 +1101,10 @@ static int __devinit broadsheetfb_probe(struct platform_device *dev) ...@@ -1101,12 +1101,10 @@ static int __devinit broadsheetfb_probe(struct platform_device *dev)
videomemorysize = roundup((dpyw*dpyh), PAGE_SIZE); videomemorysize = roundup((dpyw*dpyh), PAGE_SIZE);
videomemory = vmalloc(videomemorysize); videomemory = vzalloc(videomemorysize);
if (!videomemory) if (!videomemory)
goto err_fb_rel; goto err_fb_rel;
memset(videomemory, 0, videomemorysize);
info->screen_base = (char *)videomemory; info->screen_base = (char *)videomemory;
info->fbops = &broadsheetfb_ops; info->fbops = &broadsheetfb_ops;
......
...@@ -231,11 +231,10 @@ static int __devinit hecubafb_probe(struct platform_device *dev) ...@@ -231,11 +231,10 @@ static int __devinit hecubafb_probe(struct platform_device *dev)
videomemorysize = (DPY_W*DPY_H)/8; videomemorysize = (DPY_W*DPY_H)/8;
if (!(videomemory = vmalloc(videomemorysize))) videomemory = vzalloc(videomemorysize);
if (!videomemory)
return retval; return retval;
memset(videomemory, 0, videomemorysize);
info = framebuffer_alloc(sizeof(struct hecubafb_par), &dev->dev); info = framebuffer_alloc(sizeof(struct hecubafb_par), &dev->dev);
if (!info) if (!info)
goto err_fballoc; goto err_fballoc;
......
...@@ -628,12 +628,10 @@ static int __devinit metronomefb_probe(struct platform_device *dev) ...@@ -628,12 +628,10 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
/* we need to add a spare page because our csum caching scheme walks /* we need to add a spare page because our csum caching scheme walks
* to the end of the page */ * to the end of the page */
videomemorysize = PAGE_SIZE + (fw * fh); videomemorysize = PAGE_SIZE + (fw * fh);
videomemory = vmalloc(videomemorysize); videomemory = vzalloc(videomemorysize);
if (!videomemory) if (!videomemory)
goto err_fb_rel; goto err_fb_rel;
memset(videomemory, 0, videomemorysize);
info->screen_base = (char __force __iomem *)videomemory; info->screen_base = (char __force __iomem *)videomemory;
info->fbops = &metronomefb_ops; info->fbops = &metronomefb_ops;
......
...@@ -395,10 +395,9 @@ static int __devinit xenfb_probe(struct xenbus_device *dev, ...@@ -395,10 +395,9 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
spin_lock_init(&info->dirty_lock); spin_lock_init(&info->dirty_lock);
spin_lock_init(&info->resize_lock); spin_lock_init(&info->resize_lock);
info->fb = vmalloc(fb_size); info->fb = vzalloc(fb_size);
if (info->fb == NULL) if (info->fb == NULL)
goto error_nomem; goto error_nomem;
memset(info->fb, 0, fb_size);
info->nr_pages = (fb_size + PAGE_SIZE - 1) >> PAGE_SHIFT; info->nr_pages = (fb_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment