summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-12-31 04:51:36 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-01-19 11:44:57 -0200
commitd642de2ed472df308f8ee49417e29030f69b2095 (patch)
tree1ac77d33b3866e0542172f8e4ecd9c33c2cf772b /mm
parent7f6eb118df84715b128e25e99dc6a3ebc5b133d6 (diff)
downloadop-kernel-dev-d642de2ed472df308f8ee49417e29030f69b2095.zip
op-kernel-dev-d642de2ed472df308f8ee49417e29030f69b2095.tar.gz
[media] gspca_main: Set memory type to GSPCA_MEMORY_NO on buffer release
Before this patch we were not setting the memory type to GSPCA_MEMORY_NO when the buffers were released by the app doing a reqbufs 0. Nor would the memory type be set to GSPCA_MEMORY_NO on device close, as capture_file already is NULL on device close because of the reqbufs 0. This caused the following problem: -app1 does reqbufs USERPTR for 4 buffers -app1 does reqbufs USERPTR for 0 buffers -app2 tries to do reqbufs MMAP for 4 buffers fails because gspca_dev->memory still is USERPTR Fixing this also allows an app to switch memory type's by unrequesting the buffers and re-requesting them of a different type. This patch also moves the setting of gspca_dev->frsz and gscpa_dev->memory to after alloc_frame succeeding, so that they are not changed when allocating fails. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud