]> git.karo-electronics.de Git - mv-sheeva.git/commit
[media] gspca_main: Simplify read mode memory type checks
authorHans de Goede <hdegoede@redhat.com>
Fri, 31 Dec 2010 08:05:56 +0000 (05:05 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 Jan 2011 13:44:58 +0000 (11:44 -0200)
commitee3629914b2b115f00f4197e80b1e7cb12881059
treee3234e9d6c17dceec91e604782adb0e796364b1a
parentd642de2ed472df308f8ee49417e29030f69b2095
[media] gspca_main: Simplify read mode memory type checks

gspca_dev->memory == GSPCA_MEMORY_NO implies gspca_dev->nframes == 0,
so there is no need to check for both in dev_poll. The check in
dev_read also is more complex then needed, as dqbuf which dev_read
calls already does all necessary checks. Moreover dqbuf is holding
the proper locks while checking where as dev_read itself is not.

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>
drivers/media/video/gspca/gspca.c