Skip to content

Commit

Permalink
[media] OMAP2: V4L2: Remove GFP_DMA allocation as ZONE_DMA is not con…
Browse files Browse the repository at this point in the history
…figured on OMAP

Remove GFP_DMA from the __get_free_pages() call from omap24xxcam as ZONE_DMA
is not configured on OMAP. Earlier the page allocator used to return a page
from ZONE_NORMAL even when GFP_DMA is passed and CONFIG_ZONE_DMA is disabled.
As a result of commit a197b59, page allocator
returns null in such a scenario with a warning emitted to kernel log.

Signed-off-by: Amber Jain <amber@ti.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Amber Jain authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent e831599 commit e213e43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/omap24xxcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ static int omap24xxcam_vbq_alloc_mmap_buffer(struct videobuf_buffer *vb)
order--;

/* try to allocate as many contiguous pages as possible */
page = alloc_pages(GFP_KERNEL | GFP_DMA, order);
page = alloc_pages(GFP_KERNEL, order);
/* if allocation fails, try to allocate smaller amount */
while (page == NULL) {
order--;
page = alloc_pages(GFP_KERNEL | GFP_DMA, order);
page = alloc_pages(GFP_KERNEL, order);
if (page == NULL && !order) {
err = -ENOMEM;
goto out;
Expand Down

0 comments on commit e213e43

Please sign in to comment.