diff options
author | Joe Perches <joe@perches.com> | 2011-05-28 14:13:33 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-02 04:25:35 -0400 |
commit | 1b86d775dd4c13967e1895df09d0cef198956e81 (patch) | |
tree | 04e55246c554975d4a3378b1b3ed7c8640539fca /drivers | |
parent | bb8b26627267a82c49f47fc52a0785f079a7b063 (diff) |
video: Convert vmalloc/memset to vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/arcfb.c | 5 | ||||
-rw-r--r-- | drivers/video/broadsheetfb.c | 4 | ||||
-rw-r--r-- | drivers/video/hecubafb.c | 5 | ||||
-rw-r--r-- | drivers/video/metronomefb.c | 4 | ||||
-rw-r--r-- | drivers/video/xen-fbfront.c | 3 |
5 files changed, 7 insertions, 14 deletions
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 3ec4923c2d84..c22e8d39a2cb 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c | |||
@@ -515,11 +515,10 @@ static int __devinit arcfb_probe(struct platform_device *dev) | |||
515 | 515 | ||
516 | /* We need a flat backing store for the Arc's | 516 | /* We need a flat backing store for the Arc's |
517 | less-flat actual paged framebuffer */ | 517 | less-flat actual paged framebuffer */ |
518 | if (!(videomemory = vmalloc(videomemorysize))) | 518 | videomemory = vzalloc(videomemorysize); |
519 | if (!videomemory) | ||
519 | return retval; | 520 | return retval; |
520 | 521 | ||
521 | memset(videomemory, 0, videomemorysize); | ||
522 | |||
523 | info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev); | 522 | info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev); |
524 | if (!info) | 523 | if (!info) |
525 | goto err; | 524 | goto err; |
diff --git a/drivers/video/broadsheetfb.c b/drivers/video/broadsheetfb.c index ebda6876d3a9..377dde3d5bfc 100644 --- a/drivers/video/broadsheetfb.c +++ b/drivers/video/broadsheetfb.c | |||
@@ -1101,12 +1101,10 @@ static int __devinit broadsheetfb_probe(struct platform_device *dev) | |||
1101 | 1101 | ||
1102 | videomemorysize = roundup((dpyw*dpyh), PAGE_SIZE); | 1102 | videomemorysize = roundup((dpyw*dpyh), PAGE_SIZE); |
1103 | 1103 | ||
1104 | videomemory = vmalloc(videomemorysize); | 1104 | videomemory = vzalloc(videomemorysize); |
1105 | if (!videomemory) | 1105 | if (!videomemory) |
1106 | goto err_fb_rel; | 1106 | goto err_fb_rel; |
1107 | 1107 | ||
1108 | memset(videomemory, 0, videomemorysize); | ||
1109 | |||
1110 | info->screen_base = (char *)videomemory; | 1108 | info->screen_base = (char *)videomemory; |
1111 | info->fbops = &broadsheetfb_ops; | 1109 | info->fbops = &broadsheetfb_ops; |
1112 | 1110 | ||
diff --git a/drivers/video/hecubafb.c b/drivers/video/hecubafb.c index 1b94643ecbcf..fbef15f7a218 100644 --- a/drivers/video/hecubafb.c +++ b/drivers/video/hecubafb.c | |||
@@ -231,11 +231,10 @@ static int __devinit hecubafb_probe(struct platform_device *dev) | |||
231 | 231 | ||
232 | videomemorysize = (DPY_W*DPY_H)/8; | 232 | videomemorysize = (DPY_W*DPY_H)/8; |
233 | 233 | ||
234 | if (!(videomemory = vmalloc(videomemorysize))) | 234 | videomemory = vzalloc(videomemorysize); |
235 | if (!videomemory) | ||
235 | return retval; | 236 | return retval; |
236 | 237 | ||
237 | memset(videomemory, 0, videomemorysize); | ||
238 | |||
239 | info = framebuffer_alloc(sizeof(struct hecubafb_par), &dev->dev); | 238 | info = framebuffer_alloc(sizeof(struct hecubafb_par), &dev->dev); |
240 | if (!info) | 239 | if (!info) |
241 | goto err_fballoc; | 240 | goto err_fballoc; |
diff --git a/drivers/video/metronomefb.c b/drivers/video/metronomefb.c index ed64edfd2c43..97d45e5115e2 100644 --- a/drivers/video/metronomefb.c +++ b/drivers/video/metronomefb.c | |||
@@ -628,12 +628,10 @@ static int __devinit metronomefb_probe(struct platform_device *dev) | |||
628 | /* we need to add a spare page because our csum caching scheme walks | 628 | /* we need to add a spare page because our csum caching scheme walks |
629 | * to the end of the page */ | 629 | * to the end of the page */ |
630 | videomemorysize = PAGE_SIZE + (fw * fh); | 630 | videomemorysize = PAGE_SIZE + (fw * fh); |
631 | videomemory = vmalloc(videomemorysize); | 631 | videomemory = vzalloc(videomemorysize); |
632 | if (!videomemory) | 632 | if (!videomemory) |
633 | goto err_fb_rel; | 633 | goto err_fb_rel; |
634 | 634 | ||
635 | memset(videomemory, 0, videomemorysize); | ||
636 | |||
637 | info->screen_base = (char __force __iomem *)videomemory; | 635 | info->screen_base = (char __force __iomem *)videomemory; |
638 | info->fbops = &metronomefb_ops; | 636 | info->fbops = &metronomefb_ops; |
639 | 637 | ||
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c index a20218c2fda8..beac52fc1c0e 100644 --- a/drivers/video/xen-fbfront.c +++ b/drivers/video/xen-fbfront.c | |||
@@ -395,10 +395,9 @@ static int __devinit xenfb_probe(struct xenbus_device *dev, | |||
395 | spin_lock_init(&info->dirty_lock); | 395 | spin_lock_init(&info->dirty_lock); |
396 | spin_lock_init(&info->resize_lock); | 396 | spin_lock_init(&info->resize_lock); |
397 | 397 | ||
398 | info->fb = vmalloc(fb_size); | 398 | info->fb = vzalloc(fb_size); |
399 | if (info->fb == NULL) | 399 | if (info->fb == NULL) |
400 | goto error_nomem; | 400 | goto error_nomem; |
401 | memset(info->fb, 0, fb_size); | ||
402 | 401 | ||
403 | info->nr_pages = (fb_size + PAGE_SIZE - 1) >> PAGE_SHIFT; | 402 | info->nr_pages = (fb_size + PAGE_SIZE - 1) >> PAGE_SHIFT; |
404 | 403 | ||