[PATCH] videobuf-dma-sg.c : not need memset()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mem have malloc zero memory by kzalloc(), so it have not need to 
memset().
 
Signed-off-by: Figo.zhang <figo1802@xxxxxxxxx>
--- 
 drivers/media/video/videobuf-dma-sg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
index da1790e..add2f34 100644
--- a/drivers/media/video/videobuf-dma-sg.c
+++ b/drivers/media/video/videobuf-dma-sg.c
@@ -420,7 +420,7 @@ static void *__videobuf_alloc(size_t size)
 	mem = vb->priv = ((char *)vb)+size;
 	mem->magic=MAGIC_SG_MEM;
 
-	videobuf_dma_init(&mem->dma);
+	mem->dma.magic = MAGIC_DMABUF;
 
 	dprintk(1,"%s: allocated at %p(%ld+%ld) & %p(%ld)\n",
 		__func__,vb,(long)sizeof(*vb),(long)size-sizeof(*vb),


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux