From: Alex Gershgorin Date: Wed, 1 Aug 2012 08:05:10 +0000 (-0300) Subject: [media] media: mx3_camera: buf_init() add buffer state check X-Git-Tag: v3.6-rc3~9^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1690d86aa33fa14c0ae4ac97e59d806eeddccd2c;p=pandora-kernel.git [media] media: mx3_camera: buf_init() add buffer state check This patch checks the state of the buffer when calling .buf_init() method. This is needed for the USERPTR buffer type, because in that case .buf_init() is called every time a buffer is queued, and not only once during the preparation stage, like in the MMAP case. Without this check buffers get initialised repeatedly, which also leads to the allocation of new DMA descriptors, of which there is only a final relatively small number available. Both MMAP and USERPTR methods were successfully tested. Signed-off-by: Alex Gershgorin [g.liakhovetski@gmx.de: remove mx3_camera_buffer::state completely] Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed