From: Hans Verkuil Date: Fri, 13 Dec 2013 16:13:41 +0000 (-0300) Subject: [media] vb2: remove the 'fileio = NULL' hack X-Git-Tag: v3.14-rc1~20^2~113 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2f2f04719638322b9d792ecd25f70a55acf8270;p=pandora-kernel.git [media] vb2: remove the 'fileio = NULL' hack The read/write implementation in vb2 reuses existing vb2 functions, but it sets q->fileio to NULL before calling them in order to skip the 'q->fileio != NULL' check. This works today due to the synchronous nature of read/write, but it 1) is ugly, and 2) will fail in an asynchronous use-case such as a thread queuing and dequeuing buffers. This last example will be necessary in order to implement vb2 DVB support. This patch removes the hack by splitting up the dqbuf/qbuf/streamon/streamoff functions into an external and an internal version. The external version checks q->fileio and then calls the internal version. The read/write implementation now just uses the internal version, removing the need to set q->fileio to NULL. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed