From 6a5d77cbf26078e9ee8f88c7d77fe0a7fa4a0364 Mon Sep 17 00:00:00 2001 From: Ricardo Ribalda Date: Wed, 29 Apr 2015 09:00:45 -0300 Subject: [PATCH] [media] media/videobuf2-dma-sg: Fix handling of sg_table structure When sg_alloc_table_from_pages() does not fail it returns a sg_table structure with nents and nents_orig initialized to the same value. dma_map_sg returns the number of areas mapped by the hardware, which could be different than the areas given as an input. The output must be saved to nent. The output of dma_map, should be used to transverse the scatter list. dma_unmap_sg needs the value passed to dma_map_sg (nents_orig). sg_free_tables uses also orig_nent. This patch fix the file to follow this paradigm. Signed-off-by: Ricardo Ribalda Delgado Reviewed-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Reading git-format-patch failed